comparison plugin/plugins/SamplePlayer.cpp @ 690:1424aa29ae95

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:26:52 +0100
parents 06f13a3b9e9e
children 2fa49f5caac5 e802e550a1f2
comparison
equal deleted inserted replaced
689:573d45e9487b 690:1424aa29ae95
150 150
151 LADSPA_Handle 151 LADSPA_Handle
152 SamplePlayer::instantiate(const LADSPA_Descriptor *, unsigned long rate) 152 SamplePlayer::instantiate(const LADSPA_Descriptor *, unsigned long rate)
153 { 153 {
154 if (!hostDescriptor || !hostDescriptor->request_non_rt_thread) { 154 if (!hostDescriptor || !hostDescriptor->request_non_rt_thread) {
155 DEBUG << "SamplePlayer::instantiate: Host does not provide request_non_rt_thread, not instantiating" << endl; 155 SVDEBUG << "SamplePlayer::instantiate: Host does not provide request_non_rt_thread, not instantiating" << endl;
156 return 0; 156 return 0;
157 } 157 }
158 158
159 SamplePlayer *player = new SamplePlayer(rate); 159 SamplePlayer *player = new SamplePlayer(rate);
160 160
161 if (hostDescriptor->request_non_rt_thread(player, workThreadCallback)) { 161 if (hostDescriptor->request_non_rt_thread(player, workThreadCallback)) {
162 DEBUG << "SamplePlayer::instantiate: Host rejected request_non_rt_thread call, not instantiating" << endl; 162 SVDEBUG << "SamplePlayer::instantiate: Host rejected request_non_rt_thread call, not instantiating" << endl;
163 delete player; 163 delete player;
164 return 0; 164 return 0;
165 } 165 }
166 166
167 return player; 167 return player;
319 SamplePlayer *player = (SamplePlayer *)handle; 319 SamplePlayer *player = (SamplePlayer *)handle;
320 320
321 if (player->m_pendingProgramChange >= 0) { 321 if (player->m_pendingProgramChange >= 0) {
322 322
323 #ifdef DEBUG_SAMPLE_PLAYER 323 #ifdef DEBUG_SAMPLE_PLAYER
324 DEBUG << "SamplePlayer::workThreadCallback: pending program change " << player->m_pendingProgramChange << endl; 324 SVDEBUG << "SamplePlayer::workThreadCallback: pending program change " << player->m_pendingProgramChange << endl;
325 #endif 325 #endif
326 326
327 player->m_mutex.lock(); 327 player->m_mutex.lock();
328 328
329 int program = player->m_pendingProgramChange; 329 int program = player->m_pendingProgramChange;
362 if (m_sampleSearchComplete) return; 362 if (m_sampleSearchComplete) return;
363 363
364 m_samples.clear(); 364 m_samples.clear();
365 365
366 #ifdef DEBUG_SAMPLE_PLAYER 366 #ifdef DEBUG_SAMPLE_PLAYER
367 DEBUG << "SamplePlayer::searchSamples: Directory is \"" 367 SVDEBUG << "SamplePlayer::searchSamples: Directory is \""
368 << m_sampleDir.toLocal8Bit().data() << "\"" << endl; 368 << m_sampleDir.toLocal8Bit().data() << "\"" << endl;
369 #endif 369 #endif
370 370
371 QDir dir(m_sampleDir, "*.wav"); 371 QDir dir(m_sampleDir, "*.wav");
372 372