mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
android/aac: aac needs either hardware AEC or 16kHz sample rate
This commit is contained in:
parent
d60890107a
commit
891010b78a
1 changed files with 6 additions and 4 deletions
|
|
@ -1031,8 +1031,10 @@ static MSList *codec_append_if_new(MSList *l, PayloadType *pt){
|
|||
}
|
||||
|
||||
#if defined(ANDROID)
|
||||
static int is_aac_eld_payload(const void* a, const void* b) {
|
||||
PayloadType *pt = (PayloadType*)a;
|
||||
static int is_aac_eld_not_16k_payload(const void* _pt, const void* unused) {
|
||||
PayloadType *pt = (PayloadType*)_pt;
|
||||
if (pt->clock_rate == 16000)
|
||||
return 1;
|
||||
return strncmp(pt->mime_type, "mpeg4-generic", strlen("mpeg4-generic"));
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1053,11 +1055,11 @@ static void codecs_config_read(LinphoneCore *lc)
|
|||
audio_codecs=add_missing_codecs(lc,SalAudio,audio_codecs);
|
||||
|
||||
#if defined(ANDROID)
|
||||
/* AAC-ELD requires hardware AEC */
|
||||
/* AAC-ELD requires hardware AEC or 16kHz sample rate */
|
||||
if (lc->sound_conf.capt_sndcard &&
|
||||
!(ms_snd_card_get_capabilities(lc->sound_conf.capt_sndcard) & MS_SND_CARD_CAP_BUILTIN_ECHO_CANCELLER)) {
|
||||
/* Remove AAC-ELD */
|
||||
audio_codecs = ms_list_remove_custom(audio_codecs, is_aac_eld_payload, NULL);
|
||||
audio_codecs = ms_list_remove_custom(audio_codecs, is_aac_eld_not_16k_payload, NULL);
|
||||
ms_message("Disable AAC-ELD (needs hardware AEC)");
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue