Minimal ios support
This commit is contained in:
parent
7a2069f249
commit
33a8cde056
3 changed files with 9 additions and 5 deletions
|
|
@ -157,7 +157,11 @@ impl Voice {
|
|||
}
|
||||
}
|
||||
|
||||
let au_type = coreaudio::audio_unit::IOType::DefaultOutput;
|
||||
let au_type = if cfg!(target_os = "ios") {
|
||||
coreaudio::audio_unit::IOType::RemoteIO
|
||||
} else {
|
||||
coreaudio::audio_unit::IOType::DefaultOutput
|
||||
};
|
||||
let mut audio_unit = try!(AudioUnit::new(au_type).map_err(convert_error));
|
||||
|
||||
// TODO: iOS uses integer and fixed-point data
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ extern crate libc;
|
|||
|
||||
pub use samples_formats::{SampleFormat, Sample};
|
||||
|
||||
#[cfg(all(not(windows), not(target_os = "linux"), not(target_os = "freebsd"), not(target_os = "macos")))]
|
||||
#[cfg(all(not(windows), not(target_os = "linux"), not(target_os = "freebsd"), not(target_os = "macos"), not(target_os = "ios")))]
|
||||
use null as cpal_impl;
|
||||
|
||||
use std::fmt;
|
||||
|
|
@ -97,7 +97,7 @@ mod cpal_impl;
|
|||
#[path="wasapi/mod.rs"]
|
||||
mod cpal_impl;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||
#[path="coreaudio/mod.rs"]
|
||||
mod cpal_impl;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue