Skip to content

Commit

Permalink
Fix loop point detection problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGameratorT committed Aug 18, 2020
1 parent 9568bbe commit a9a107d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ bool MainWindow::GetLoopMarkers(WAVStruct* wav, int fileSize, int& loopStart, in
if(!ok)
{
aloopStart = ReadWAVTag(wav, fileSize, "[");
if(aloopStart == "")
return false;
loopStart = aloopStart.toInt(&ok);
}

Expand All @@ -118,6 +120,8 @@ bool MainWindow::GetLoopMarkers(WAVStruct* wav, int fileSize, int& loopStart, in
if(!ok)
{
aloopEnd = ReadWAVTag(wav, fileSize, "]");
if(aloopEnd == "")
return false;
loopEnd = aloopEnd.toInt(&ok);
}

Expand Down Expand Up @@ -204,7 +208,7 @@ bool MainWindow::ReadWAV(QFile& file)
{
useMarkers = true;
}
else
else if (gotMarkers && gotSamples)
{
QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Information);
Expand Down

0 comments on commit a9a107d

Please sign in to comment.