Use the first PA device if the prefered one is not available.

This commit is contained in:
Adrien Béraud
2013-04-05 16:01:23 +11:00
parent de90927dee
commit d5f33df660
4 changed files with 26 additions and 8 deletions

View File

@ -255,7 +255,7 @@ Sdp::setMediaDescriptorLines(bool audio)
#ifdef HAVE_OPUS
// Opus sample rate is allways declared as 48000 and channel num is allways 2 in rtpmap as per
// http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03#section-6.2
if(payload == Opus::payloadType) {
if(payload == Opus::PAYLOAD_TYPE) {
rtpmap.clock_rate = 48000;
rtpmap.param.ptr = ((char* const)"2");
rtpmap.param.slen = 1;
@ -273,7 +273,7 @@ Sdp::setMediaDescriptorLines(bool audio)
#ifdef HAVE_OPUS
// Declare stereo support for opus
if(payload == Opus::payloadType) {
if(payload == Opus::PAYLOAD_TYPE) {
std::ostringstream os;
os << "fmtp:" << dynamic_payload << " stereo=1; sprop-stereo=" << (channels>1 ? 1 : 0);
med->attr[med->attr_count++] = pjmedia_sdp_attr_create(memPool_, os.str().c_str(), NULL);