Add NetBSD support
This commit is contained in:
parent
f19ceeb8e0
commit
0f8cd7a9c8
7 changed files with 25 additions and 24 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@ macro_rules! impl_platform_host {
|
|||
}
|
||||
|
||||
// TODO: Add pulseaudio and jack here eventually.
|
||||
#[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"))]
|
||||
mod platform_impl {
|
||||
pub use crate::host::alsa::{
|
||||
Device as AlsaDevice, Devices as AlsaDevices, Host as AlsaHost, Stream as AlsaStream,
|
||||
|
|
@ -687,6 +687,7 @@ mod platform_impl {
|
|||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "macos",
|
||||
target_os = "ios",
|
||||
target_os = "emscripten",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue