diff --git a/stepmania/src/RageSound.cpp b/stepmania/src/RageSound.cpp index 248b97eafd..483f1b1424 100644 --- a/stepmania/src/RageSound.cpp +++ b/stepmania/src/RageSound.cpp @@ -326,12 +326,6 @@ int RageSound::FillBuf( int frames ) if(cnt == 0) return got_something; /* EOF */ - if( Sample->GetNumChannels() == 1 ) - { - RageSoundUtil::ConvertMonoToStereoInPlace( (int16_t *) inbuf, cnt / sizeof(int16_t) ); - cnt *= 2; - } - if(cnt == -1) { Fail(Sample->GetError()); @@ -340,6 +334,12 @@ int RageSound::FillBuf( int frames ) return 0; } + if( Sample->GetNumChannels() == 1 ) + { + RageSoundUtil::ConvertMonoToStereoInPlace( (int16_t *) inbuf, cnt / sizeof(int16_t) ); + cnt *= 2; + } + RateChange( inbuf, cnt, m_Param.speed_input_samples, m_Param.speed_output_samples, channels ); /* Add the data to the buffer. */