Changeset 5273 for pjproject/trunk/pjsip/src/pjsua2/media.cpp
- Timestamp:
- Apr 4, 2016 1:44:10 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua2/media.cpp
r5170 r5273 680 680 681 681 void AudDevManager::setCaptureDev(int capture_dev) const throw(Error) 682 { 683 int playback_dev = getPlaybackDev(); 684 685 PJSUA2_CHECK_EXPR( pjsua_set_snd_dev(capture_dev, playback_dev) ); 682 { 683 pjsua_snd_dev_param param; 684 pjsua_snd_dev_param_default(¶m); 685 686 param.capture_dev = capture_dev; 687 param.playback_dev = getPlaybackDev(); 688 689 param.mode = PJSUA_SND_DEV_NO_IMMEDIATE_OPEN; 690 691 PJSUA2_CHECK_EXPR( pjsua_set_snd_dev2(¶m) ); 686 692 } 687 693 688 694 void AudDevManager::setPlaybackDev(int playback_dev) const throw(Error) 689 695 { 690 int capture_dev = getCaptureDev(); 691 692 PJSUA2_CHECK_EXPR( pjsua_set_snd_dev(capture_dev, playback_dev) ); 696 pjsua_snd_dev_param param; 697 pjsua_snd_dev_param_default(¶m); 698 699 param.capture_dev = getCaptureDev(); 700 param.playback_dev = playback_dev; 701 702 param.mode = PJSUA_SND_DEV_NO_IMMEDIATE_OPEN; 703 704 PJSUA2_CHECK_EXPR( pjsua_set_snd_dev2(¶m) ); 693 705 } 694 706 … … 719 731 { 720 732 return (MediaPort*)pjsua_set_no_snd_dev(); 733 } 734 735 void AudDevManager::setSndDevMode(unsigned mode) const throw(Error) 736 { 737 int capture_dev = 0, playback_dev = 0; 738 pjsua_snd_dev_param param; 739 pj_status_t status = pjsua_get_snd_dev(&capture_dev, &playback_dev); 740 if (status != PJ_SUCCESS) { 741 PJSUA2_RAISE_ERROR2(status, "AudDevManager::setSndDevMode()"); 742 } 743 pjsua_snd_dev_param_default(¶m); 744 param.capture_dev = capture_dev; 745 param.playback_dev = playback_dev; 746 param.mode = mode; 747 PJSUA2_CHECK_EXPR( pjsua_set_snd_dev2(¶m) ); 721 748 } 722 749
Note: See TracChangeset
for help on using the changeset viewer.