WMME Default Communications Device

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

 



Hi.

Has anyone ever done any work to the WMME media library to use the Windows Default Communications Device rather than the Default Audio Device?

I guess most users of the stack are doing the same as me and using PJMEDIA_AUD_DEFAULT_CAPTURE_DEV and PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV when setting the sound devices which will use the Windows WAVE_MAPPER virtual device. The current implementation however uses the current default device which is not necessarily the same as the default comms device, with the latter normally what you would like for a Softphone application.

I've made a quick hack into wmme_dev.c just to verify that it can be done. It basically comes down to adding a new flag (WAVE_MAPPED_DEFAULT_COMMUNICATION_DEVICE) to the call of WaveInOpen or WaveOutOpen which is only valid when you are passing WAVE_MAPPER (-1) as the device ID.

I initially thought about adding two new enums to the pjmedia_aud_dev_index type that would be something like this:

    /**
     * Constant to denote default communications capture device
     */
    PJMEDIA_AUD_DEFAULT_COMMS_CAPTURE_DEV = -4,

    /**
     * Constant to denote default communications playback device
     */
    PJMEDIA_AUD_DEFAULT_COMMS_PLAYBACK_DEV = -5

But it looks like too much work in that it requires fiddling with areas of the stack I am unfamiliar with. Alternatively there is the option of adding a new member to the pjmedia_aud_param struct that could be used to select between either the default audio or default comms devices. I'd appreciate any advice as it looks a useful thing to persue. I know it would be possible to not pass in the -1, -2 pre-defined IDs and just find out the default comms device and use that index instead, but that would lose the benefits you get from Windows when using the WAVE_MAPPER device such as when a headset is removed while it's currently being used. In this scenario Windows will try to automatically switch to using a different device. There are also other features such as 'ducking' which mean that the default comms device should be the preferred audio device for any Softphone application.

Gary

Gary Metalle
Senior Software Engineer

[Description: http://www.ipfx.com/images/logo.gif]
p

+64 9 3573487


e

gary.metalle at ipfx.com<mailto:gary.metalle at ipfx.com>

w

www.ipfx.com<http://www.ipfx.com/>




This e-mail contains IPFX information which may be privileged or confidential and is intended for use only by the individual(s) or entity named above. If you are not the intended recipient, note that disclosing, copying, distributing or using this information is prohibited. If you have received this e-mail in error, please advise immediately to the e-mail address above and permanently delete this message and any attachments. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. We monitor our e-mail system and may record your e-mails. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120828/5e4a5333/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 4896 bytes
Desc: image001.gif
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120828/5e4a5333/attachment-0001.gif>


[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