changeset 38:54287e5e7451 sv1-v0.9rc1 sv1-v0.9rc2

* Make vertical scale alignment modes work in note layer as well as time-value layer, and several significant fixes to it * Make it possible to draw notes properly on the note layer * Show units (and frequencies etc in note layer's case) in the time-value and note layer description boxes * Minor fix to item edit dialog layout * Some minor menu rearrangement * Comment out a lot of debug output * Add SV website and reference URLs to Help menu, and add code to (attempt to) open them in the user's preferred browser
author Chris Cannam
date Fri, 12 May 2006 14:40:43 +0000
parents 58cf1620d6e3
children 4ed2448582cc
files audioio/AudioCallbackPlaySource.cpp audioio/AudioGenerator.cpp
diffstat 2 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Thu May 11 15:02:14 2006 +0000
+++ b/audioio/AudioCallbackPlaySource.cpp	Fri May 12 14:40:43 2006 +0000
@@ -116,7 +116,7 @@
 	m_sourceChannelCount = modelChannels;
     }
 
-    std::cerr << "Adding model with " << modelChannels << " channels " << std::endl;
+//    std::cerr << "Adding model with " << modelChannels << " channels " << std::endl;
 
     if (m_sourceSampleRate == 0) {
 
@@ -211,9 +211,9 @@
     size_t lastEnd = 0;
     for (std::set<Model *>::const_iterator i = m_models.begin();
 	 i != m_models.end(); ++i) {
-	std::cerr << "AudioCallbackPlaySource::removeModel(" << model << "): checking end frame on model " << *i << std::endl;
+//	std::cerr << "AudioCallbackPlaySource::removeModel(" << model << "): checking end frame on model " << *i << std::endl;
 	if ((*i)->getEndFrame() > lastEnd) lastEnd = (*i)->getEndFrame();
-	std::cerr << "(done, lastEnd now " << lastEnd << ")" << std::endl;
+//	std::cerr << "(done, lastEnd now " << lastEnd << ")" << std::endl;
     }
     m_lastModelEndFrame = lastEnd;
 
@@ -277,12 +277,11 @@
 	m_writeBuffers->push_back(new RingBuffer<float>(m_ringBufferSize));
     }
 
-    std::cerr << "AudioCallbackPlaySource::clearRingBuffers: Created "
-	      << count << " write buffers" << std::endl;
+//    std::cerr << "AudioCallbackPlaySource::clearRingBuffers: Created "
+//	      << count << " write buffers" << std::endl;
 
     if (!haveLock) {
 	m_mutex.unlock();
-//!!!	m_condition.wakeAll();
     }
 }
 
@@ -378,7 +377,7 @@
 void
 AudioCallbackPlaySource::setTargetBlockSize(size_t size)
 {
-    std::cerr << "AudioCallbackPlaySource::setTargetBlockSize() -> " << size << std::endl;
+//    std::cerr << "AudioCallbackPlaySource::setTargetBlockSize() -> " << size << std::endl;
     assert(size < m_ringBufferSize);
     m_blockSize = size;
 }
@@ -386,7 +385,7 @@
 size_t
 AudioCallbackPlaySource::getTargetBlockSize() const
 {
-    std::cerr << "AudioCallbackPlaySource::getTargetBlockSize() -> " << m_blockSize << std::endl;
+//    std::cerr << "AudioCallbackPlaySource::getTargetBlockSize() -> " << m_blockSize << std::endl;
     return m_blockSize;
 }
 
@@ -595,7 +594,7 @@
     m_factor(factor),
     m_blockSize(blockSize)
 {
-    std::cerr << "TimeStretcherData::TimeStretcherData(" << channels << ", " << factor << ", " << blockSize << ")" << std::endl;
+//    std::cerr << "TimeStretcherData::TimeStretcherData(" << channels << ", " << factor << ", " << blockSize << ")" << std::endl;
 
     for (size_t ch = 0; ch < channels; ++ch) {
 	m_stretcher[ch] = StretcherBuffer
@@ -610,7 +609,7 @@
 
 AudioCallbackPlaySource::TimeStretcherData::~TimeStretcherData()
 {
-    std::cerr << "IntegerTimeStretcher::~IntegerTimeStretcher" << std::endl;
+//    std::cerr << "TimeStretcherData::~TimeStretcherData" << std::endl;
 
     while (!m_stretcher.empty()) {
 	delete m_stretcher.begin()->second.first;
@@ -1175,7 +1174,7 @@
     m_bufferScavenger.claim(m_readBuffers);
     m_readBuffers = m_writeBuffers;
     m_readBufferFill = m_writeBufferFill;
-    std::cerr << "unified" << std::endl;
+//    std::cerr << "unified" << std::endl;
 }
 
 void
--- a/audioio/AudioGenerator.cpp	Thu May 11 15:02:14 2006 +0000
+++ b/audioio/AudioGenerator.cpp	Fri May 12 14:40:43 2006 +0000
@@ -120,7 +120,7 @@
 AudioGenerator::playPluginConfigurationChanged(const Model *model,
                                                QString configurationXml)
 {
-    std::cerr << "AudioGenerator::playPluginConfigurationChanged" << std::endl;
+//    std::cerr << "AudioGenerator::playPluginConfigurationChanged" << std::endl;
 
     if (m_synthMap.find(model) == m_synthMap.end()) {
         std::cerr << "AudioGenerator::playPluginConfigurationChanged: We don't know about this plugin" << std::endl;
@@ -267,6 +267,7 @@
 
     if (!instance) {
 	std::cerr << "Failed to instantiate plugin " << pluginId.toStdString() << std::endl;
+        return 0;
     }
 
     setSampleDir(instance);
@@ -276,11 +277,11 @@
     }
     std::string defaultProgram = instance->getProgram(0, 0);
     if (defaultProgram != "") {
-        std::cerr << "first selecting default program " << defaultProgram << std::endl;
+//        std::cerr << "first selecting default program " << defaultProgram << std::endl;
         instance->selectProgram(defaultProgram);
     }
     if (program != "") {
-        std::cerr << "now selecting desired program " << program.toStdString() << std::endl;
+//        std::cerr << "now selecting desired program " << program.toStdString() << std::endl;
         instance->selectProgram(program.toStdString());
     }
     instance->setIdealChannelCount(m_targetChannelCount); // reset!
@@ -334,7 +335,7 @@
 {
     if (m_targetChannelCount == targetChannelCount) return;
 
-    std::cerr << "AudioGenerator::setTargetChannelCount(" << targetChannelCount << ")" << std::endl;
+//    std::cerr << "AudioGenerator::setTargetChannelCount(" << targetChannelCount << ")" << std::endl;
 
     QMutexLocker locker(&m_mutex);
     m_targetChannelCount = targetChannelCount;