Merge pull request #358 from jbeich/dragonfly

DragonFly support
This commit is contained in:
mitchmindtree 2020-01-13 15:47:45 +01:00 committed by GitHub
commit 2bf905f3ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ winapi = { version = "0.3", features = ["audiosessiontypes", "audioclient", "com
asio-sys = { version = "0.1", path = "asio-sys", optional = true } asio-sys = { version = "0.1", path = "asio-sys", optional = true }
parking_lot = "0.9" parking_lot = "0.9"
[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))'.dependencies] [target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))'.dependencies]
alsa-sys = { version = "0.1", path = "alsa-sys" } alsa-sys = { version = "0.1", path = "alsa-sys" }
libc = "0.2" libc = "0.2"

View File

@ -32,7 +32,7 @@ pub type SupportedOutputFormats = VecIntoIter<SupportedFormat>;
mod enumerate; mod enumerate;
/// The default linux and freebsd host type. /// The default linux, dragonfly and freebsd host type.
#[derive(Debug)] #[derive(Debug)]
pub struct Host; pub struct Host;
@ -47,7 +47,7 @@ impl HostTrait for Host {
type Device = Device; type Device = Device;
fn is_available() -> bool { fn is_available() -> bool {
// Assume ALSA is always available on linux/freebsd. // Assume ALSA is always available on linux/dragonfly/freebsd.
true true
} }

View File

@ -1,4 +1,4 @@
#[cfg(any(target_os = "linux", target_os = "freebsd"))] #[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
pub(crate) mod alsa; pub(crate) mod alsa;
#[cfg(all(windows, feature = "asio"))] #[cfg(all(windows, feature = "asio"))]
pub(crate) mod asio; pub(crate) mod asio;

View File

@ -416,7 +416,7 @@ macro_rules! impl_platform_host {
} }
// TODO: Add pulseaudio and jack here eventually. // TODO: Add pulseaudio and jack here eventually.
#[cfg(any(target_os = "linux", target_os = "freebsd"))] #[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"))]
mod platform_impl { mod platform_impl {
pub use crate::host::alsa::{ pub use crate::host::alsa::{
Device as AlsaDevice, Device as AlsaDevice,
@ -514,7 +514,7 @@ mod platform_impl {
} }
} }
#[cfg(not(any(windows, target_os = "linux", target_os = "freebsd", target_os = "macos", #[cfg(not(any(windows, target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "macos",
target_os = "ios", target_os = "emscripten")))] target_os = "ios", target_os = "emscripten")))]
mod platform_impl { mod platform_impl {
pub use crate::host::null::{ pub use crate::host::null::{