Changeset 744 for pjproject/trunk/pjmedia/src/pjmedia/sound_port.c
- Timestamp:
- Sep 27, 2006 10:49:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/sound_port.c
r740 r744 125 125 if (snd_port->ec_suspended) { 126 126 snd_port->ec_suspended = PJ_FALSE; 127 //pjmedia_echo_state_reset(snd_port->ec_state); 127 128 PJ_LOG(4,(THIS_FILE, "EC activated")); 128 129 } … … 141 142 snd_port->ec_suspended = PJ_TRUE; 142 143 PJ_LOG(4,(THIS_FILE, "EC suspended because of inactivity")); 144 } 145 if (snd_port->ec_state) { 146 /* To maintain correct delay in EC */ 147 pjmedia_echo_playback(snd_port->ec_state, output); 143 148 } 144 149 } … … 354 359 355 360 /* 356 * Create sound recorder port.361 * Create sound recorder AEC. 357 362 */ 358 363 PJ_DEF(pj_status_t) pjmedia_snd_port_create_rec( pj_pool_t *pool, … … 457 462 unsigned options) 458 463 { 464 pjmedia_snd_stream_info si; 459 465 pj_status_t status; 460 466 … … 464 470 PJ_EINVALIDOP); 465 471 472 /* Sound port must have 16bits per sample */ 473 PJ_ASSERT_RETURN(snd_port->bits_per_sample == 16, 474 PJ_EINVALIDOP); 475 466 476 /* Destroy AEC */ 467 477 if (snd_port->ec_state) { … … 473 483 474 484 if (tail_ms != 0) { 485 unsigned delay_ms; 486 487 status = pjmedia_snd_stream_get_info(snd_port->snd_stream, &si); 488 if (status != PJ_SUCCESS) 489 si.rec_latency = si.play_latency = 0; 490 491 delay_ms = (si.rec_latency + si.play_latency) * 1000 / 492 snd_port->clock_rate; 475 493 status = pjmedia_echo_create(pool, snd_port->clock_rate, 476 494 snd_port->samples_per_frame,
Note: See TracChangeset
for help on using the changeset viewer.