Fix loop point detection problems.

This commit is contained in:
TheGameratorT 2020-08-18 16:16:31 +01:00
parent 9568bbe381
commit a9a107d360

View File

@ -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);
}
@ -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);
}
@ -204,7 +208,7 @@ bool MainWindow::ReadWAV(QFile& file)
{
useMarkers = true;
}
else
else if (gotMarkers && gotSamples)
{
QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Information);