Fix occasional glitch when switching from stereo to mono tracks due to uninitialized m/s coding flag.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19498 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Giacomelli 2008-12-20 02:38:35 +00:00
parent ec380a79d9
commit 7a0baa3aa5

View file

@ -328,8 +328,10 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx)
coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE); coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE);
#endif #endif
/*clear stereo setting to avoid glitches when switching stereo->mono*/
s->channel_coded[0]=0; s->channel_coded[0]=0;
s->channel_coded[1]=0; s->channel_coded[1]=0;
s->ms_stereo=0;
s->sample_rate = wfx->rate; s->sample_rate = wfx->rate;
s->nb_channels = wfx->channels; s->nb_channels = wfx->channels;