Skip to content

Commit 5d1d358

Browse files
committed
Fix stream switching in File Reader
1 parent dacb39d commit 5d1d358

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Source/Processors/FileReader/FileReader.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ void FileReader::setActiveStream (int index, bool reset)
316316
return;
317317
}
318318

319-
//TODO: Change to setActiveStream
320319
input->setActiveRecord (index);
321320

322321
currentNumChannels = input->getActiveNumChannels();
@@ -335,11 +334,11 @@ void FileReader::setActiveStream (int index, bool reset)
335334
if (currentSample > currentNumTotalSamples)
336335
reset = true;
337336

338-
//TODO: Also need to check if currentSample
337+
stopSample = currentNumTotalSamples;
338+
339339
if (reset)
340340
{
341341
startSample = 0;
342-
stopSample = currentNumTotalSamples;
343342
bufferCacheWindow = 0;
344343

345344
/*
@@ -607,6 +606,8 @@ void FileReader::updateSettings()
607606
readBuffer = &bufferB;
608607
bufferCacheWindow = 0;
609608
m_shouldFillBackBuffer.set (false);
609+
if (firstProcess)
610+
switchBuffer();
610611

611612
LOGD ("File Reader finished updating custom settings.");
612613
}

0 commit comments

Comments
 (0)