@@ -305,7 +305,7 @@ unsafe fn format_from_waveformatex_ptr(
305305 Some ( format)
306306}
307307
308- #[ cfg( feature = "wasapi-virtual-default-devices" ) ]
308+ #[ cfg( not ( feature = "windows-legacy" ) ) ]
309309unsafe fn activate_audio_interface_sync (
310310 deviceinterfacepath : windows:: core:: PWSTR ,
311311) -> windows:: core:: Result < Audio :: IAudioClient > {
@@ -587,13 +587,14 @@ impl Device {
587587 return Ok ( lock) ;
588588 }
589589
590- // When using virtual default devices , we use `ActivateAudioInterfaceAsync` to get
591- // an `IAudioClient` for the default output or input device . When retrieved this way,
592- // streams will be automatically rerouted if the default device is changed.
590+ // By default, we use `ActivateAudioInterfaceAsync` to get an `IAudioClient` for
591+ // virtual default devices . When retrieved this way, streams will be automatically
592+ // rerouted if the default device is changed.
593593 //
594- // Otherwise, we use `Activate` to get an `IAudioClient` for the current device.
594+ // When the `windows-legacy` feature is enabled, we use `Activate` to get an
595+ // `IAudioClient` for the current device, which does not support automatic rerouting.
595596
596- #[ cfg( feature = "wasapi-virtual-default-devices" ) ]
597+ #[ cfg( not ( feature = "windows-legacy" ) ) ]
597598 let audio_client: Audio :: IAudioClient = unsafe {
598599 match & self . device {
599600 DeviceHandle :: DefaultOutput => {
@@ -614,7 +615,7 @@ impl Device {
614615 }
615616 } ;
616617
617- #[ cfg( not ( feature = "wasapi-virtual-default-devices" ) ) ]
618+ #[ cfg( feature = "windows-legacy" ) ]
618619 let audio_client = unsafe {
619620 self . immdevice ( )
620621 . ok_or ( windows:: core:: Error :: new (
0 commit comments