From f424a6a30582fa44d8425d23f6bcfed807e7966e Mon Sep 17 00:00:00 2001 From: xenakios Date: Mon, 19 Feb 2018 21:12:54 +0200 Subject: [PATCH] Lower number of supported channels for imported file. Remove commented out code. --- Source/PluginProcessor.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 6266457..ec896d1 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -677,14 +677,12 @@ String PaulstretchpluginAudioProcessor::setAudioFile(File f) auto ai = unique_from_raw(m_afm->createReaderFor(f)); if (ai != nullptr) { - if (ai->numChannels > 32) + if (ai->numChannels > 8) { - //MessageManager::callAsync([cb, file]() { cb("Too many channels in file " + file.getFullPathName()); }); return "Too many channels in file "+f.getFullPathName(); } if (ai->bitsPerSample>32) { - //MessageManager::callAsync([cb, file]() { cb("Too high bit depth in file " + file.getFullPathName()); }); return "Too high bit depth in file " + f.getFullPathName(); } m_thumb->setSource(new FileInputSource(f)); @@ -698,10 +696,7 @@ String PaulstretchpluginAudioProcessor::setAudioFile(File f) m_using_memory_buffer = false; setDirty(); return String(); - //MessageManager::callAsync([cb, file]() { cb(String()); }); - } - return "Could not open file " + f.getFullPathName(); }