Skip to content
Snippets Groups Projects
Commit 37eb2783 authored by Andris's avatar Andris
Browse files

Fix FileReader glitches due to write address calculation bug at end of input

parent 44b97e37
No related branches found
No related tags found
No related merge requests found
......@@ -245,14 +245,14 @@ void FileReader::process (AudioSampleBuffer& buffer)
{
samplesToRead = stopSample - currentSample;
if (samplesToRead > 0)
input->readData (readBuffer + samplesRead, samplesToRead);
input->readData (readBuffer + samplesRead * currentNumChannels, samplesToRead);
input->seekTo (startSample);
currentSample = startSample;
}
else
{
input->readData (readBuffer + samplesRead, samplesToRead);
input->readData (readBuffer + samplesRead * currentNumChannels, samplesToRead);
currentSample += samplesToRead;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment