Skip to content

Commit cef8bd0

Browse files
committed
Fix scrubber toggle button
1 parent 71271f3 commit cef8bd0

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Source/Processors/FileReader/FileReader.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ int64 FileReader::getCurrentSample()
315315

316316
void FileReader::setPlaybackStart(int64 startSample)
317317
{
318-
LOGD("Settings start sample: ", startSample);
319318
this->startSample = startSample;
320319
this->totalSamplesAcquired = startSample;
321320

@@ -325,7 +324,6 @@ void FileReader::setPlaybackStart(int64 startSample)
325324

326325
void FileReader::setPlaybackStop(int64 stopSample)
327326
{
328-
LOGD("Settings stop sample: ", stopSample);
329327
this->stopSample = stopSample;
330328
currentNumScrubbedSamples = stopSample - startSample;
331329
}

Source/Processors/FileReader/FileReaderEditor.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,9 @@ void PlaybackButton::setState(bool isActive)
384384

385385
this->isActive = isActive;
386386

387-
if (isActive && !fileReader->playbackIsActive())
388-
{
387+
if (!isActive) // Pressed play
389388
static_cast<FileReaderEditor*>(fileReader->getEditor())->updatePlaybackTimes();
390-
fileReader->startAcquisition();
391-
}
392-
else if (!isActive)
389+
else if (!isActive && fileReader->playbackIsActive())
393390
fileReader->stopAcquisition();
394391
}
395392

@@ -729,9 +726,7 @@ void FileReaderEditor::buttonClicked (Button* button)
729726
} else if (button == playbackButton) {
730727

731728
playbackButton->setState(!playbackButton->getState());
732-
733-
if (playbackButton->getState())
734-
acquisitionIsActive = true;
729+
fileReader->togglePlayback();
735730

736731
}
737732

0 commit comments

Comments
 (0)