PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.47k stars 305 forks source link

Support "Default Device" in Core Audio #41

Open PortAudio-admin opened 17 years ago

PortAudio-admin commented 17 years ago

Issue created by @bejayoharen

Mac OS X supports what it calls the "default audio device", which is different from the device that happens to be the default. The "Default Audio Device" may change if a device is plugged or unplugged. For example, this behavior can be seen in !iTunes: if you use the control panel to set the default device to a USB device and then unplug the device, !iTunes will keep playing, but switches to another device.

!CoreAudio probably takes care of most of the troubling stuff in this transition, but it isn't clear what happens when the number of channels changes, or what other things need to be handled by he !CoreAudio client. Certainly any converters the client is responsible for (such as input SR conversion) would need to be changed. Another thing that's unclear is how this device should be presented to !PortAudio clients. Should it be another device, or should it be used whenever the user selects the device that happens to be the default? or calls !OpenDefaultStream? Or should it only be reachable using platform specific calls, since this is not a normal behavior in !PortAudio?

PortAudio-admin commented 16 years ago

Comment by @RossBencina

I think this raises interesting questions for the future.. but for now I think having it as a new separate special device makes the most sense with regard to the current PortAudio API definition.

The current PortAudio default device index model is based on the idea of providing a hint to the client as to which normal device is the default device. If that can change while a stream is open then I wouldn't expect portaudio to suddenly start playing out a different device. Same for Pa_OpenDefaultStream() -- which is really just a shortcut, nothing more.

PortAudio-admin commented 12 years ago

Comment by @RossBencina

TRAC migration: propagating ticket status from TRAC