Add NetBSD support

This commit is contained in:
pin 2022-09-25 07:54:19 +02:00
parent f19ceeb8e0
commit 0f8cd7a9c8
7 changed files with 25 additions and 24 deletions

View file

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

View file

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