Browse Source

Lower number of supported channels for imported file. Remove commented out code.

tags/1.0.2
xenakios 7 years ago
parent
commit
f424a6a305
1 changed files with 1 additions and 6 deletions
  1. +1
    -6
      Source/PluginProcessor.cpp

+ 1
- 6
Source/PluginProcessor.cpp View File

@@ -677,14 +677,12 @@ String PaulstretchpluginAudioProcessor::setAudioFile(File f)
auto ai = unique_from_raw(m_afm->createReaderFor(f)); auto ai = unique_from_raw(m_afm->createReaderFor(f));
if (ai != nullptr) 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(); return "Too many channels in file "+f.getFullPathName();
} }
if (ai->bitsPerSample>32) 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(); return "Too high bit depth in file " + f.getFullPathName();
} }
m_thumb->setSource(new FileInputSource(f)); m_thumb->setSource(new FileInputSource(f));
@@ -698,10 +696,7 @@ String PaulstretchpluginAudioProcessor::setAudioFile(File f)
m_using_memory_buffer = false; m_using_memory_buffer = false;
setDirty(); setDirty();
return String(); return String();
//MessageManager::callAsync([cb, file]() { cb(String()); });

} }
return "Could not open file " + f.getFullPathName(); return "Could not open file " + f.getFullPathName();
} }




Loading…
Cancel
Save