Merge pull request #468 from endragor/android-support

Android support via Oboe
This commit is contained in:
mitchmindtree 2020-10-27 12:26:33 +01:00 • committed by GitHub
commit f8775b1e7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 867 additions and 0 deletions

View file

@ -556,6 +556,24 @@ mod platform_impl {
}
}
#[cfg(target_os = "android")]
mod platform_impl {
pub use crate::host::oboe::{
Device as OboeDevice, Devices as OboeDevices, Host as OboeHost, Stream as OboeStream,
SupportedInputConfigs as OboeSupportedInputConfigs,
SupportedOutputConfigs as OboeSupportedOutputConfigs,
};
impl_platform_host!(Oboe oboe "Oboe");
/// The default host for the current compilation target platform.
pub fn default_host() -> Host {
OboeHost::new()
.expect("the default host should always be available")
.into()
}
}
#[cfg(not(any(
windows,
target_os = "linux",
@ -564,6 +582,7 @@ mod platform_impl {
target_os = "macos",
target_os = "ios",
target_os = "emscripten",
target_os = "android",
all(target_arch = "wasm32", feature = "wasm-bindgen"),
)))]
mod platform_impl {