- Timestamp:
- Jul 13, 2011 3:05:22 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_media.c
r3629 r3632 377 377 * It is idle when there is no port connection in the bridge and 378 378 * there is no active call. 379 * 380 * Note: this block is now valid if no snd dev is used because of #1299 379 381 */ 380 if ((pjsua_var.snd_port!=NULL || pjsua_var.null_snd!=NULL) && 382 if ((pjsua_var.snd_port!=NULL || pjsua_var.null_snd!=NULL || 383 pjsua_var.no_snd) && 381 384 pjsua_var.snd_idle_timer.id == PJ_FALSE && 382 385 pjmedia_conf_get_connect_count(pjsua_var.mconf) == 0 && … … 2422 2425 } 2423 2426 } 2427 } else if (pjsua_var.no_snd) { 2428 if (!pjsua_var.snd_is_on) { 2429 pjsua_var.snd_is_on = PJ_TRUE; 2430 /* Notify app */ 2431 if (pjsua_var.ua_cfg.cb.on_snd_dev_operation) { 2432 (*pjsua_var.ua_cfg.cb.on_snd_dev_operation)(1); 2433 } 2434 } 2424 2435 } 2425 2436 … … 2438 2449 return status; 2439 2450 } 2440 } 2441 2451 } else if (pjsua_var.no_snd && !pjsua_var.snd_is_on) { 2452 pjsua_var.snd_is_on = PJ_TRUE; 2453 /* Notify app */ 2454 if (pjsua_var.ua_cfg.cb.on_snd_dev_operation) { 2455 (*pjsua_var.ua_cfg.cb.on_snd_dev_operation)(1); 2456 } 2457 } 2442 2458 } 2443 2459 … … 3093 3109 /* Close existing sound port */ 3094 3110 close_snd_dev(); 3111 3112 /* Notify app */ 3113 if (pjsua_var.ua_cfg.cb.on_snd_dev_operation) { 3114 (*pjsua_var.ua_cfg.cb.on_snd_dev_operation)(1); 3115 } 3095 3116 3096 3117 /* Create memory pool for sound device. */ … … 3230 3251 static void close_snd_dev(void) 3231 3252 { 3253 /* Notify app */ 3254 if (pjsua_var.snd_is_on && pjsua_var.ua_cfg.cb.on_snd_dev_operation) { 3255 (*pjsua_var.ua_cfg.cb.on_snd_dev_operation)(0); 3256 } 3257 3232 3258 /* Close sound device */ 3233 3259 if (pjsua_var.snd_port) { … … 3263 3289 pj_pool_release(pjsua_var.snd_pool); 3264 3290 pjsua_var.snd_pool = NULL; 3291 pjsua_var.snd_is_on = PJ_FALSE; 3265 3292 } 3266 3293 … … 3325 3352 3326 3353 pjsua_var.no_snd = PJ_FALSE; 3354 pjsua_var.snd_is_on = PJ_TRUE; 3327 3355 3328 3356 return PJ_SUCCESS; … … 3359 3387 /* Close existing sound device */ 3360 3388 close_snd_dev(); 3389 3390 /* Notify app */ 3391 if (pjsua_var.ua_cfg.cb.on_snd_dev_operation) { 3392 (*pjsua_var.ua_cfg.cb.on_snd_dev_operation)(1); 3393 } 3361 3394 3362 3395 /* Create memory pool for sound device. */ … … 3389 3422 3390 3423 pjsua_var.no_snd = PJ_FALSE; 3424 pjsua_var.snd_is_on = PJ_TRUE; 3391 3425 3392 3426 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.