Setting Sound Device Id

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

 



I have 2 sound card installed in my computer, in order to execure 2 pjsua
application independently for testing purposes. the command line argument
--playback-dev and --capture-dev need be introduces to change the default
devices. But what device Id is required to do this. I'm executing the below
code in order to get some info about installed devices. Also I tried some
ids but all failed, like --playback-dev=3 --capture-dev=3.
Your help is very appreciated.

            pjmedia_aud_dev_info info[20];
            unsigned count = 20;
            pj_status_t stat;
            int i, capture_id,playback_id;

            stat = pjsua_enum_aud_devs(info, &count);
            if (stat == PJ_SUCCESS)
            {
                for (i = 0; i < count; i++)
                    PJ_LOG(3, (THIS_FILE, "Audio Device %d: %s", i,
info[i].name));

                 stat = pjsua_get_snd_dev(&capture_id, &playback_id);
                 if(stat==PJ_SUCCESS)
                 {
                    PJ_LOG(3, (THIS_FILE, "Current Capture Device id %d",
capture_id));
                    PJ_LOG(3, (THIS_FILE, "Current Playback Device id %d",
playback_id));
                 }
            }
            else
            {
                PJ_LOG(3, (THIS_FILE, "Error enumeration of audio devices,
%d", status));
            }



-- 
Kabil Akp?nar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100813/3f456dea/attachment.html>


[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