Skip to content

Commit f8a2823

Browse files
committed
Fix potential crash at high samplerates
1 parent b6a4c8a commit f8a2823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/PluginProcessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ void PluginProcessor::runBackupLoop()
15841584
// Only run backup timer if GUI is visible
15851585
if(!getActiveEditor()) return;
15861586

1587-
int blocksToProcess = backupRunLoopInterval / (int)((DEFDACBLKSIZE / AudioProcessor::getSampleRate()) * 1000.0);
1587+
int blocksToProcess = backupRunLoopInterval / std::max(1, (int)((DEFDACBLKSIZE / AudioProcessor::getSampleRate()) * 1000.0));
15881588
if(blocksToProcess < 1)
15891589
{
15901590
blocksToProcess = jmax(1, blocksToProcess); // At least 1 block

0 commit comments

Comments
 (0)