update delay from api
This commit is contained in:
parent
0e265b5185
commit
065de5f514
1 changed files with 5 additions and 5 deletions
|
|
@ -354,13 +354,13 @@ AACContext * aac_encode_open(AACSettings info) {
|
|||
|
||||
case AAC_HE:
|
||||
aot = AOT_SBR;
|
||||
delay = INPUT_DELAY_SBR(info.frameSize == 960 ? CORE_DELAY_LC_960 : CORE_DELAY_LC, info.sampleRate > 48000 ? 1 : 2) + (info.sampleRate > 48000 ? 0 : 4);
|
||||
delay = INPUT_DELAY_SBR(info.frameSize == 960 ? CORE_DELAY_LC_960 : CORE_DELAY_LC, 2) + 4;
|
||||
break;
|
||||
|
||||
case AAC_HEV2:
|
||||
if (info.sampleRate > 48000 || info.noChannels != 2) goto fail;
|
||||
if (info.noChannels != 2) goto fail;
|
||||
aot = AOT_PS;
|
||||
delay = INPUT_DELAY_PS(info.frameSize == 960 ? CORE_DELAY_LC_960 : CORE_DELAY_LC, info.sampleRate > 48000 ? 1 : 2);
|
||||
delay = INPUT_DELAY_PS(info.frameSize == 960 ? CORE_DELAY_LC_960 : CORE_DELAY_LC, 2);
|
||||
break;
|
||||
|
||||
case AAC_LD:
|
||||
|
|
@ -372,13 +372,13 @@ AACContext * aac_encode_open(AACSettings info) {
|
|||
case AAC_ELD:
|
||||
if (info.adts) goto fail;
|
||||
aot = AOT_AAC_ELD;
|
||||
delay = INPUT_DELAY_ELD_SBR(info.frameSize == 480 ? CORE_DELAY_LD_480 : CORE_DELAY_LD_512, info.sampleRate > 48000 ? 1 : 2) + (info.sampleRate > 48000 ? 0 : 4);
|
||||
delay = INPUT_DELAY_ELD_SBR(info.frameSize == 480 ? CORE_DELAY_LD_480 : CORE_DELAY_LD_512, 2) + 4;
|
||||
break;
|
||||
|
||||
case AAC_ELDV2:
|
||||
if (info.adts) goto fail;
|
||||
aot = AOT_AAC_ELD;
|
||||
delay = INPUT_DELAY_ELD_SBRV2(info.frameSize == 480 ? CORE_DELAY_LD_480 : CORE_DELAY_LD_512, info.sampleRate >= 27713 ? 2 : 1) + (info.sampleRate >= 27713 ? 4 : 0);
|
||||
delay = INPUT_DELAY_ELD_SBRV2(info.frameSize == 480 ? CORE_DELAY_LD_480 : CORE_DELAY_LD_512, 2) + 4;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue