Skip to content

Commit

Permalink
Re #1751 (misc): Avoid setting sound device if sound devices are the …
Browse files Browse the repository at this point in the history
…same (thanks to Christian Ambach for the patch)

git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4852 74dad513-b988-da41-8d7b-12977e46ad98
  • Loading branch information
ming committed May 28, 2014
1 parent 03a4ebe commit 3217b54
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pjsip/src/pjsua-lib/pjsua_aud.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,15 @@ PJ_DEF(pj_status_t) pjsua_set_snd_dev( int capture_dev,

PJSUA_LOCK();

if (pjsua_var.cap_dev == capture_dev &&
pjsua_var.play_dev == playback_dev)
{
PJ_LOG(4, (THIS_FILE, "No changes in capture and playback devices"));
PJSUA_UNLOCK();
pj_log_pop_indent();
return PJ_SUCCESS;
}

/* Null-sound */
if (capture_dev==NULL_SND_DEV_ID && playback_dev==NULL_SND_DEV_ID) {
PJSUA_UNLOCK();
Expand Down

0 comments on commit 3217b54

Please sign in to comment.