Changeset 4079 for pjproject/branches/1.x/pjmedia/src/pjmedia/sound_port.c
- Timestamp:
- Apr 24, 2012 10:26:07 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjmedia/src/pjmedia/sound_port.c
r4065 r4079 226 226 if (param_copy.flags & PJMEDIA_AUD_DEV_CAP_EC) { 227 227 /* EC is wanted */ 228 if (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) { 228 if ((snd_port->prm_ec_options & PJMEDIA_ECHO_USE_SW_ECHO) == 0 && 229 snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) 230 { 229 231 /* Device supports EC */ 230 232 /* Nothing to do */ 231 233 } else { 232 /* Device doesn't support EC, remove EC settings from 234 /* Application wants to use software EC or device 235 * doesn't support EC, remove EC settings from 233 236 * device parameters 234 237 */ … … 262 265 snd_port->samples_per_frame); 263 266 264 /* Create software EC if parameter specifies EC but device 265 * doesn't support EC. Only do this if the format is PCM! 267 /* Create software EC if parameter specifies EC and 268 * (app specifically requests software EC or device 269 * doesn't support EC). Only do this if the format is PCM! 266 270 */ 267 271 if ((snd_port->aud_param.flags & PJMEDIA_AUD_DEV_CAP_EC) && 268 (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC)==0 && 272 ((snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC)==0 || 273 (snd_port->prm_ec_options & PJMEDIA_ECHO_USE_SW_ECHO) != 0) && 269 274 param_copy.ext_fmt.id == PJMEDIA_FORMAT_PCM) 270 275 { … … 506 511 507 512 /* Determine whether we use device or software EC */ 508 if (snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) { 513 if ((snd_port->prm_ec_options & PJMEDIA_ECHO_USE_SW_ECHO) == 0 && 514 snd_port->aud_caps & PJMEDIA_AUD_DEV_CAP_EC) 515 { 509 516 /* We use device EC */ 510 517 pj_bool_t ec_enabled;
Note: See TracChangeset
for help on using the changeset viewer.