cpal icon indicating copy to clipboard operation
cpal copied to clipboard

Support Exclusive Mode

Open fb39ca4 opened this issue 9 years ago • 5 comments

fb39ca4 avatar Mar 02 '16 23:03 fb39ca4

I'm guessing this is referring to the windows backend as I remember briefly seeing some documentation on this when working on the wasapi backend. Could you elaborate on how exclusive mode behaves differently from shared mode? Do you see a path towards supporting this for all backends?

mitchmindtree avatar Feb 12 '18 13:02 mitchmindtree

When in exclusive mode you can write (or read, I guess) directly to (from) the hardware. It is therefore faster than shared mode, but no other application can access the device in the meanwhile, and we cannot access it if another application already uses it in shared mode.

tomaka avatar Feb 12 '18 13:02 tomaka

Ah, thanks for the explanation. I guess this might be useful for some pro-audio software like DAWs and live performance applications. That said, I don't remember seeing anything like this in the coreaudio or alsa backends.

I guess if this were to be implemented, it would be an addition of a whole new wasapi_exclusive backend, perhaps enabled by a feature?

Alternatively, we could introduce something similar to PortAudio's Host API? I've opened up #204 for discussion.

mitchmindtree avatar Feb 12 '18 13:02 mitchmindtree

CoreAudio also has a hog mode property: kAudioDevicePropertyHogMode

Hog mode is important if you go for the best audio quality. For example, streaming software clients such as Spotify and Tidal have hog mode support. Spotify turns this on by default.

blueneogeo avatar May 10 '20 20:05 blueneogeo

Any update on this? Or is it already implemented in one of the other closed tickets?

blueneogeo avatar Mar 29 '21 11:03 blueneogeo