diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-10-22 07:21:34 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-10-22 07:21:34 +0400 |
commit | 3b2aee062d08fc72f12a4379ce2d6e2b444d5021 (patch) | |
tree | 5e470d24cb1f00a2e764823fd404220f55b0ff80 /silk/enc_API.c | |
parent | e53ebd696a34e2a74b1ccb5132a946b7c965f448 (diff) |
Implements glitchless switching between SILK bandwidths
Only encoder changes were necessary because this uses the same
"redundant frames" mechanism as SILK<->CELT switching.
This also fixes a regression introduced in 78291b27 that was
causing the encoder to go back and forth between bandwidths when
SILK wasn't ready to change.
Diffstat (limited to 'silk/enc_API.c')
-rw-r--r-- | silk/enc_API.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/silk/enc_API.c b/silk/enc_API.c index 149befa6..1320de46 100644 --- a/silk/enc_API.c +++ b/silk/enc_API.c @@ -149,6 +149,8 @@ opus_int silk_Encode( return ret; } + encControl->switchReady = 0; + if( encControl->nChannelsInternal > psEnc->nChannelsInternal ) { /* Mono -> Stereo transition: init state of second channel and stereo state */ ret += silk_init_encoder( &psEnc->state_Fxx[ 1 ] ); |