Mercurial > hg > svapp
diff audioio/AudioGenerator.cpp @ 10:b6dc944128da
* Add basics of MIDI file import. Doesn't actually create the model yet.
* Add rewind to start / ffwd to end.
* Make zoom constraint default to sqrt(2) type if no constraint set
author | Chris Cannam |
---|---|
date | Thu, 09 Feb 2006 18:01:52 +0000 |
parents | 24b500216029 |
children | 8dc0ae8fccdd |
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp Wed Feb 08 17:59:16 2006 +0000 +++ b/audioio/AudioGenerator.cpp Thu Feb 09 18:01:52 2006 +0000 @@ -38,7 +38,7 @@ { } -void +bool AudioGenerator::addModel(Model *model) { if (m_sourceSampleRate == 0) { @@ -52,12 +52,13 @@ if (dtvm) { m_sourceSampleRate = model->getSampleRate(); + return true; } } SparseOneDimensionalModel *sodm = dynamic_cast<SparseOneDimensionalModel *>(model); - if (!sodm) return; // nothing else to initialise + if (!sodm) return false; // nothing else to initialise // QString pluginId = "dssi:/usr/lib/dssi/dssi-vst.so:FEARkILLERrev1.dll"; // QString pluginId = "dssi:/usr/lib/dssi/hexter.so:hexter"; @@ -71,7 +72,7 @@ if (!factory) { std::cerr << "Failed to get plugin factory" << std::endl; - return; + return false; } RealTimePluginInstance *instance = @@ -93,7 +94,10 @@ instance->setIdealChannelCount(m_targetChannelCount); // reset! } else { std::cerr << "Failed to instantiate plugin" << std::endl; + return false; } + + return true; } void