@@ -448,30 +448,50 @@ macro_rules! impl_platform_host {
448448// TODO: Add pulseaudio and jack here eventually.
449449#[ cfg( any( target_os = "linux" , target_os = "dragonfly" , target_os = "freebsd" ) ) ]
450450mod platform_impl {
451+ #[ cfg( not( feature = "linux-sndio" ) ) ]
451452 pub use crate :: host:: alsa:: {
452453 Device as AlsaDevice , Devices as AlsaDevices , Host as AlsaHost , Stream as AlsaStream ,
453454 SupportedInputConfigs as AlsaSupportedInputConfigs ,
454455 SupportedOutputConfigs as AlsaSupportedOutputConfigs ,
455456 } ;
456- #[ cfg( feature = "jack" ) ]
457+ #[ cfg( and ( feature = "jack" , not ( feature = "linux-sndio" ) ) ) ]
457458 pub use crate :: host:: jack:: {
458459 Device as JackDevice , Devices as JackDevices , Host as JackHost , Stream as JackStream ,
459460 SupportedInputConfigs as JackSupportedInputConfigs ,
460461 SupportedOutputConfigs as JackSupportedOutputConfigs ,
461462 } ;
462463
463- #[ cfg( feature = "jack" ) ]
464+ #[ cfg( and ( feature = "jack" , not ( feature = "linux-sndio" ) ) ) ]
464465 impl_platform_host ! ( Jack jack "JACK" , Alsa alsa "ALSA" ) ;
465466
466- #[ cfg( not( feature = "jack" ) ) ]
467+ #[ cfg( and ( not( feature = "jack" ) , not ( feature = "linux-sndio" ) ) ) ]
467468 impl_platform_host ! ( Alsa alsa "ALSA" ) ;
468469
469470 /// The default host for the current compilation target platform.
471+ #[ cfg( not( feature = "linux-sndio" ) ) ]
470472 pub fn default_host ( ) -> Host {
471473 AlsaHost :: new ( )
472474 . expect ( "the default host should always be available" )
473475 . into ( )
474476 }
477+
478+ #[ cfg( feature = "linux-sndio" ) ]
479+ pub use crate :: host:: sndio:: {
480+ Device as SndioDevice , Devices as SndioDevices , Host as SndioHost , Stream as SndioStream ,
481+ SupportedInputConfigs as SndioSupportedInputConfigs ,
482+ SupportedOutputConfigs as SndioSupportedOutputConfigs ,
483+ } ;
484+
485+ #[ cfg( feature = "linux-sndio" ) ]
486+ impl_platform_host ! ( Sndio sndio "sndio" ) ;
487+
488+ /// The default host for the current compilation target platform.
489+ #[ cfg( feature = "linux-sndio" ) ]
490+ pub fn default_host ( ) -> Host {
491+ SndioHost :: new ( )
492+ . expect ( "the default host should always be available" )
493+ . into ( )
494+ }
475495}
476496
477497#[ cfg( target_os = "openbsd" ) ]
0 commit comments