changeset 177:7dae51741cc9

* Fix crash on exit on win32. This was caused by incorrectly using fftw_free() to free the string returned from fftw_export_wisdom_to_string(), instead of plain free(). * Various debug artifacts related to tracking down the above
author Chris Cannam
date Fri, 14 Aug 2009 14:01:09 +0000
parents d8017c8859eb
children e81c1ea227ee
files audioio/AudioCallbackPlaySource.cpp audioio/AudioGenerator.cpp audioio/AudioPortAudioTarget.cpp framework/MainWindowBase.cpp
diffstat 4 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/audioio/AudioCallbackPlaySource.cpp	Thu Jul 16 13:57:18 2009 +0000
+++ b/audioio/AudioCallbackPlaySource.cpp	Fri Aug 14 14:01:09 2009 +0000
@@ -99,6 +99,9 @@
 
 AudioCallbackPlaySource::~AudioCallbackPlaySource()
 {
+#ifdef DEBUG_AUDIO_PLAY_SOURCE
+    std::cerr << "AudioCallbackPlaySource::~AudioCallbackPlaySource entering" << std::endl;
+#endif
     m_exiting = true;
 
     if (m_fillThread) {
@@ -128,6 +131,9 @@
 
     m_bufferScavenger.scavenge(true);
     m_pluginScavenger.scavenge(true);
+#ifdef DEBUG_AUDIO_PLAY_SOURCE
+    std::cerr << "AudioCallbackPlaySource::~AudioCallbackPlaySource finishing" << std::endl;
+#endif
 }
 
 void
--- a/audioio/AudioGenerator.cpp	Thu Jul 16 13:57:18 2009 +0000
+++ b/audioio/AudioGenerator.cpp	Fri Aug 14 14:01:09 2009 +0000
@@ -65,6 +65,9 @@
 
 AudioGenerator::~AudioGenerator()
 {
+#ifdef DEBUG_AUDIO_GENERATOR
+    std::cerr << "AudioGenerator::~AudioGenerator" << std::endl;
+#endif
 }
 
 void
--- a/audioio/AudioPortAudioTarget.cpp	Thu Jul 16 13:57:18 2009 +0000
+++ b/audioio/AudioPortAudioTarget.cpp	Fri Aug 14 14:01:09 2009 +0000
@@ -141,6 +141,9 @@
 void 
 AudioPortAudioTarget::shutdown()
 {
+#ifdef DEBUG_PORT_AUDIO_TARGET
+    std::cerr << "AudioPortAudioTarget::shutdown" << std::endl;
+#endif
     m_done = true;
 }
 
@@ -181,10 +184,15 @@
                               PaStreamCallbackFlags)
 {
 #ifdef DEBUG_AUDIO_PORT_AUDIO_TARGET    
-    std::cout << "AudioPortAudioTarget::process(" << nframes << ")" << std::endl;
+    std::cerr << "AudioPortAudioTarget::process(" << nframes << ")" << std::endl;
 #endif
 
-    if (!m_source || m_done) return 0;
+    if (!m_source || m_done) {
+#ifdef DEBUG_AUDIO_PORT_AUDIO_TARGET
+        std::cerr << "AudioPortAudioTarget::process: Doing nothing, no source or application done" << std::endl;
+#endif
+        return 0;
+    }
 
     float *output = (float *)outputBuffer;
 
--- a/framework/MainWindowBase.cpp	Thu Jul 16 13:57:18 2009 +0000
+++ b/framework/MainWindowBase.cpp	Fri Aug 14 14:01:09 2009 +0000
@@ -230,6 +230,7 @@
 
 MainWindowBase::~MainWindowBase()
 {
+    std::cerr << "MainWindowBase::~MainWindowBase" << std::endl;
     if (m_playTarget) m_playTarget->shutdown();
 //    delete m_playTarget;
     delete m_playSource;