Audio Device Questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/1/08, Norman Franke <norman at myasd.com> wrote:
>  I'm attempting to allow my PJSUA-based app to automatically handle audio
> device changes, for example, plugging in a headset or removing the active
> headset. I can detect a change (under Mac OS X) via Core Audio's callbacks.
> I can get PJ to re-initialize by calling pjmedia_snd_deinit and
> pjmedia_snd_init. However, I'm having problems mapping the devices since all
> PJ has is a name. Unfortunately, names are not unique with USB devices. So I
> can have multiple of the same name. It would be handy if one could get the
> native device ID from PortAudio. Failing that, can I assume that the devices
> will always be in the same order that Pa_GetDeviceInfo returns them in? It
> contains a PaHostApiIndex which I can then use to get the native device ID
> via Core Audio?
>

At present pjmedia's device ID is exactly the same as PA's device
index, so you could use the device ID with PA API directly. I think I
don't have any plan to change this behavior, so this should be a safe
assumption.

cheers,
 -benny


>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux