Changeset 4709
- Timestamp:
- Jan 22, 2014 8:02:56 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
r4634 r4709 86 86 #define CMD_MEDIA_ADJUST_VOL ((CMD_MEDIA*10)+4) 87 87 #define CMD_MEDIA_CODEC_PRIO ((CMD_MEDIA*10)+5) 88 #define CMD_MEDIA_SPEAKER_TOGGLE ((CMD_MEDIA*10)+6) 88 89 89 90 /* status & config level 2 command */ … … 1342 1343 case CMD_MEDIA_CODEC_PRIO: 1343 1344 status = cmd_set_codec_prio(cval); 1345 break; 1346 case CMD_MEDIA_SPEAKER_TOGGLE: 1347 { 1348 static int route = PJMEDIA_AUD_DEV_ROUTE_DEFAULT; 1349 status = pjsua_snd_get_setting(PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, 1350 &route); 1351 if (status != PJ_SUCCESS) { 1352 PJ_PERROR(2, (THIS_FILE, status, 1353 "Warning: unable to retrieve route setting")); 1354 } 1355 1356 if (route == PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER) 1357 route = PJMEDIA_AUD_DEV_ROUTE_DEFAULT; 1358 else 1359 route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER; 1360 1361 PJ_LOG(4,(THIS_FILE, "Setting output route to %s %s", 1362 (route==PJMEDIA_AUD_DEV_ROUTE_DEFAULT? 1363 "default" : "loudspeaker"), 1364 (status? "anyway" : ""))); 1365 1366 status = pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, 1367 &route, PJ_TRUE); 1368 PJ_PERROR(4,(THIS_FILE, status, "Result")); 1369 } 1344 1370 break; 1345 1371 } … … 2831 2857 " <ARG name='speaker_port' type='int' desc='Speaker Level'/>" 2832 2858 " </CMD>" 2859 " <CMD name='speakertog' id='4006' desc='Toggle audio output route' />" 2833 2860 " <CMD name='codec_prio' id='4005' sc='Cp' " 2834 2861 " desc='Arrange codec priorities'>"
Note: See TracChangeset
for help on using the changeset viewer.