mirror of
https://github.com/RPCS3/soundtouch.git
synced 2024-11-09 12:22:51 +01:00
Fix receiveSamples buffer advance if maxSamples is bigger than samplesInBuffer
This commit is contained in:
parent
259bf81e20
commit
ced3ce8d5e
@ -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