Conversation
10c5718 to
cb8e94d
Compare
|
This is needed for BMO 1628634. In Ubuntu PA is configured to make a new input device the system default. We don't want to switch to that new device because it is against the spec. |
|
We've been discussing this change via PM. Changing the device switching behaviour of cubeb streams is fine, but we need a clear idea of the desired behaviour at the cubeb API level. With that in hand, we can address any behavioural inconsistencies existing in the various backends. Currently:
I think the WASAPI behaviour is closest to the original intent of the API: passing a valid cubeb_devid means the stream only ever uses that device and passing a null cubeb_devid allows the stream to follow that device type's OS default. My proposal is to change the PulseAudio backend to match the current Windows behaviour, which means setting DONT_MOVE on an input or output stream only if a cubeb_devid was specified. If we need to support a use case where the caller passes a null cubeb_devid but doesn't want the stream to follow the default device, the caller could indicate that by setting CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING during stream initialization. That pref is currently only implemented for WASAPI, but it'd be simple to add to the other backends. |
|
I think this plan is good, because it makes sense on an API level and allows us to implement the behaviour we need for the web. I can take care of aligning the |
|
Thanks for summarizing our discussion. I totally agree and I will follow up on the implementation here. One thing I would like to mention explicitly is that the use of |
You're right that the WASAPI backend handles it that way. That's due to the very limited requirements of the existing use inside Gecko, and that is no longer needed due to sandboxing and AudioSession remoting. The flag is per- |
|
For |
Set DONT_MOVE in input and output device if device id is specified or the CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING is set.
cb8e94d to
e69763b
Compare
Following the discussion in mozilla/cubeb-pulse-rs#54 and elsewhere, document the interaction between cubeb_stream_init parameters and cubeb's intended device switching policy.
Stop moving to a new device when the default device changes or when the current device is removed.