- Timestamp:
- Feb 23, 2009 10:21:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia/sound_port.c
r2469 r2474 253 253 254 254 /* Create software EC if parameter specifies EC but device 255 * doesn't support EC 255 * doesn't support EC. Only do this if the format is PCM! 256 256 */ 257 257 if ((snd_port->aud_param.flags & PJMEDIA_AUD_DEV_CAP_EC) && 258 (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC)==0) 258 (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC)==0 && 259 param_copy.ext_fmt.id == PJMEDIA_FORMAT_PCM) 259 260 { 260 261 if ((snd_port->aud_param.flags & PJMEDIA_AUD_DEV_CAP_EC_TAIL)==0) { … … 532 533 } else { 533 534 /* We use software EC */ 534 /* Sound port must have 16bits per sample */535 PJ_ASSERT_RETURN(snd_port->bits_per_sample == 16,536 PJ_EINVALIDOP);537 535 538 536 /* Check if there is change in parameters */ … … 543 541 } 544 542 543 status = pjmedia_aud_stream_get_param(snd_port->aud_stream, &prm); 544 if (status != PJ_SUCCESS) 545 return status; 546 547 /* Audio stream must be in PCM format */ 548 PJ_ASSERT_RETURN(prm.ext_fmt.id == PJMEDIA_FORMAT_PCM, 549 PJ_EINVALIDOP); 550 545 551 /* Destroy AEC */ 546 552 if (snd_port->ec_state) { … … 549 555 } 550 556 551 snd_port->ec_options = options;552 snd_port->ec_tail_len = tail_ms;553 554 557 if (tail_ms != 0) { 555 558 unsigned delay_ms; 556 557 status = pjmedia_aud_stream_get_param(snd_port->aud_stream, &prm);558 if (status != PJ_SUCCESS)559 prm.input_latency_ms = prm.output_latency_ms = 0;560 559 561 560 //No need to add input latency in the latency calculation, … … 578 577 status = PJ_SUCCESS; 579 578 } 579 580 snd_port->ec_options = options; 581 snd_port->ec_tail_len = tail_ms; 580 582 } 581 583
Note: See TracChangeset
for help on using the changeset viewer.