Skip to content

Commit 2ba658d

Browse files
adding sampling rate to BWE cross fade
Signed-off-by: Jan Buethe <jan.buethe@gmx.net>
1 parent f50b949 commit 2ba658d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

silk/dec_API.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ opus_int silk_Decode( /* O Returns error co
405405
}
406406
} else {
407407
ret += silk_resampler( &channel_state[ n ].resampler_state, resample_out_ptr, &samplesOut1_tmp[ n ][ 1 ], nSamplesOutDec );
408-
if (decControl->prev_osce_extended_mode == OSCE_MODE_SILK_BBWE) {
408+
if (decControl->prev_osce_extended_mode == OSCE_MODE_SILK_BBWE && decControl->internalSampleRate == 16000) {
409+
/* fade out if internal sample rate did not change */
409410
osce_bwe(&psDec->osce_model, &channel_state[ n ].osce_bwe,
410411
resamp_buffer, &samplesOut1_tmp[ n ][ 1 ], nSamplesOutDec, arch);
411412
/* cross-fade with upsampled signal */

0 commit comments

Comments
 (0)