mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-25 03:42:36 +01:00
Fix receiveSamples buffer advance if maxSamples is bigger than samplesInBuffer
This commit is contained in:
parent
2cf59a0d51
commit
394e1f58b2
@ -224,13 +224,9 @@ uint FIFOSampleBuffer::receiveSamples(SAMPLETYPE *output, uint maxSamples)
|
||||
// the sample buffer with the 'ptrBegin' function.
|
||||
uint FIFOSampleBuffer::receiveSamples(uint maxSamples)
|
||||
{
|
||||
if (maxSamples >= samplesInBuffer)
|
||||
if (maxSamples > samplesInBuffer)
|
||||
{
|
||||
uint temp;
|
||||
|
||||
temp = samplesInBuffer;
|
||||
samplesInBuffer = 0;
|
||||
return temp;
|
||||
maxSamples = samplesInBuffer;
|
||||
}
|
||||
|
||||
samplesInBuffer -= maxSamples;
|
||||
|
Loading…
Reference in New Issue
Block a user