comparison audioio/AudioPortAudioTarget.cpp @ 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 4c9c04645685
children 58b64dbb49c6
comparison
equal deleted inserted replaced
176:d8017c8859eb 177:7dae51741cc9
139 } 139 }
140 140
141 void 141 void
142 AudioPortAudioTarget::shutdown() 142 AudioPortAudioTarget::shutdown()
143 { 143 {
144 #ifdef DEBUG_PORT_AUDIO_TARGET
145 std::cerr << "AudioPortAudioTarget::shutdown" << std::endl;
146 #endif
144 m_done = true; 147 m_done = true;
145 } 148 }
146 149
147 bool 150 bool
148 AudioPortAudioTarget::isOK() const 151 AudioPortAudioTarget::isOK() const
179 unsigned long nframes, 182 unsigned long nframes,
180 const PaStreamCallbackTimeInfo *, 183 const PaStreamCallbackTimeInfo *,
181 PaStreamCallbackFlags) 184 PaStreamCallbackFlags)
182 { 185 {
183 #ifdef DEBUG_AUDIO_PORT_AUDIO_TARGET 186 #ifdef DEBUG_AUDIO_PORT_AUDIO_TARGET
184 std::cout << "AudioPortAudioTarget::process(" << nframes << ")" << std::endl; 187 std::cerr << "AudioPortAudioTarget::process(" << nframes << ")" << std::endl;
185 #endif 188 #endif
186 189
187 if (!m_source || m_done) return 0; 190 if (!m_source || m_done) {
191 #ifdef DEBUG_AUDIO_PORT_AUDIO_TARGET
192 std::cerr << "AudioPortAudioTarget::process: Doing nothing, no source or application done" << std::endl;
193 #endif
194 return 0;
195 }
188 196
189 float *output = (float *)outputBuffer; 197 float *output = (float *)outputBuffer;
190 198
191 assert(nframes <= m_bufferSize); 199 assert(nframes <= m_bufferSize);
192 200