diff audioio/AudioCallbackPlaySource.cpp @ 233:8aace2d9f1c2

Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author Chris Cannam
date Tue, 14 Jun 2011 15:27:12 +0100
parents 8c13e8219903
children 1fcee2a1c03e f853dfb200de
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Tue Jun 14 14:49:22 2011 +0100
+++ b/audioio/AudioCallbackPlaySource.cpp	Tue Jun 14 15:27:12 2011 +0100
@@ -101,7 +101,7 @@
 AudioCallbackPlaySource::~AudioCallbackPlaySource()
 {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    DEBUG << "AudioCallbackPlaySource::~AudioCallbackPlaySource entering" << endl;
+    SVDEBUG << "AudioCallbackPlaySource::~AudioCallbackPlaySource entering" << endl;
 #endif
     m_exiting = true;
 
@@ -136,7 +136,7 @@
     m_bufferScavenger.scavenge(true);
     m_pluginScavenger.scavenge(true);
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    DEBUG << "AudioCallbackPlaySource::~AudioCallbackPlaySource finishing" << endl;
+    SVDEBUG << "AudioCallbackPlaySource::~AudioCallbackPlaySource finishing" << endl;
 #endif
 }
 
@@ -192,7 +192,7 @@
                 if (wfm && wfm != dtvm &&
                     wfm->getSampleRate() != model->getSampleRate() &&
                     wfm->getSampleRate() == m_sourceSampleRate) {
-                    DEBUG << "AudioCallbackPlaySource::addModel: Conflicting wave file model " << *i << " found" << endl;
+                    SVDEBUG << "AudioCallbackPlaySource::addModel: Conflicting wave file model " << *i << " found" << endl;
                     conflicting = true;
                     break;
                 }
@@ -200,7 +200,7 @@
 
             if (conflicting) {
 
-                DEBUG << "AudioCallbackPlaySource::addModel: ERROR: "
+                SVDEBUG << "AudioCallbackPlaySource::addModel: ERROR: "
                           << "New model sample rate does not match" << endl
                           << "existing model(s) (new " << model->getSampleRate()
                           << " vs " << m_sourceSampleRate
@@ -266,7 +266,7 @@
 AudioCallbackPlaySource::modelChanged(size_t startFrame, size_t endFrame)
 {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    DEBUG << "AudioCallbackPlaySource::modelChanged(" << startFrame << "," << endFrame << ")" << endl;
+    SVDEBUG << "AudioCallbackPlaySource::modelChanged(" << startFrame << "," << endFrame << ")" << endl;
 #endif
     if (endFrame > m_lastModelEndFrame) {
         m_lastModelEndFrame = endFrame;
@@ -384,11 +384,11 @@
     if (m_viewManager->getPlaySelectionMode() &&
 	!m_viewManager->getSelections().empty()) {
 
-        DEBUG << "AudioCallbackPlaySource::play: constraining frame " << startFrame << " to selection = ";
+        SVDEBUG << "AudioCallbackPlaySource::play: constraining frame " << startFrame << " to selection = ";
 
         startFrame = m_viewManager->constrainFrameToSelection(startFrame);
 
-        DEBUG << startFrame << endl;
+        SVDEBUG << startFrame << endl;
 
     } else {
 	if (startFrame >= m_lastModelEndFrame) {
@@ -466,7 +466,7 @@
 AudioCallbackPlaySource::stop()
 {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    DEBUG << "AudioCallbackPlaySource::stop()" << endl;
+    SVDEBUG << "AudioCallbackPlaySource::stop()" << endl;
 #endif
     bool changed = m_playing;
     m_playing = false;
@@ -555,7 +555,7 @@
         m_blockSize = size;
     }
     if (size * 4 > m_ringBufferSize) {
-        DEBUG << "AudioCallbackPlaySource::setTarget: Buffer size "
+        SVDEBUG << "AudioCallbackPlaySource::setTarget: Buffer size "
                   << size << " > a quarter of ring buffer size "
                   << m_ringBufferSize << ", calling for more ring buffer"
                   << endl;
@@ -848,7 +848,7 @@
     MultiSelection::SelectionList::const_iterator i;
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    DEBUG << "AudioCallbackPlaySource::rebuildRangeLists" << endl;
+    SVDEBUG << "AudioCallbackPlaySource::rebuildRangeLists" << endl;
 #endif
 
     if (!selections.empty()) {
@@ -968,7 +968,7 @@
     m_resampleQuality = q;
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE
-    DEBUG << "AudioCallbackPlaySource::setResampleQuality: setting to "
+    SVDEBUG << "AudioCallbackPlaySource::setResampleQuality: setting to "
               << m_resampleQuality << endl;
 #endif
 
@@ -1068,7 +1068,7 @@
 
     if (!m_playing) {
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-        DEBUG << "AudioCallbackPlaySource::getSourceSamples: Not playing" << endl;
+        SVDEBUG << "AudioCallbackPlaySource::getSourceSamples: Not playing" << endl;
 #endif
 	for (size_t ch = 0; ch < getTargetChannelCount(); ++ch) {
 	    for (int i = 0; i < count; ++i) {
@@ -1079,7 +1079,7 @@
     }
 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-    DEBUG << "AudioCallbackPlaySource::getSourceSamples: Playing" << endl;
+    SVDEBUG << "AudioCallbackPlaySource::getSourceSamples: Playing" << endl;
 #endif
 
     // Ensure that all buffers have at least the amount of data we
@@ -1230,7 +1230,7 @@
                 
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
                 if (c == 0) {
-                    DEBUG << "feeding stretcher: got " << gotHere
+                    SVDEBUG << "feeding stretcher: got " << gotHere
                               << ", " << rb->getReadSpace() << " remain" << endl;
                 }
 #endif
@@ -1722,7 +1722,7 @@
 		    // OK, we don't have enough and there's more to
 		    // read -- don't unify until we can do better
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-                    DEBUG << "AudioCallbackPlaySource::unifyRingBuffers: Not unifying: write buffer has less (" << wb->getReadSpace() << ") than " << m_blockSize*2 << " to read and write buffer fill (" << m_writeBufferFill << ") is not close to end frame (" << m_lastModelEndFrame << ")" << endl;
+                    SVDEBUG << "AudioCallbackPlaySource::unifyRingBuffers: Not unifying: write buffer has less (" << wb->getReadSpace() << ") than " << m_blockSize*2 << " to read and write buffer fill (" << m_writeBufferFill << ") is not close to end frame (" << m_lastModelEndFrame << ")" << endl;
 #endif
 		    return;
 		}
@@ -1742,7 +1742,7 @@
     }
     
 #ifdef DEBUG_AUDIO_PLAY_SOURCE_PLAYING
-    DEBUG << "AudioCallbackPlaySource::unifyRingBuffers: m_readBufferFill = " << m_readBufferFill << ", rf = " << rf << ", m_writeBufferFill = " << m_writeBufferFill << endl;
+    SVDEBUG << "AudioCallbackPlaySource::unifyRingBuffers: m_readBufferFill = " << m_readBufferFill << ", rf = " << rf << ", m_writeBufferFill = " << m_writeBufferFill << endl;
 #endif
 
     size_t wf = m_writeBufferFill;