comparison plugin/plugins/SamplePlayer.cpp @ 687:06f13a3b9e9e debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:09 +0100
parents 9a6b50d3cc50
children 1424aa29ae95
comparison
equal deleted inserted replaced
686:b4a8d8221eaf 687:06f13a3b9e9e
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 std::cerr << "SamplePlayer::instantiate: Host does not provide request_non_rt_thread, not instantiating" << std::endl; 155 DEBUG << "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 std::cerr << "SamplePlayer::instantiate: Host rejected request_non_rt_thread call, not instantiating" << std::endl; 162 DEBUG << "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 std::cerr << "SamplePlayer::workThreadCallback: pending program change " << player->m_pendingProgramChange << std::endl; 324 DEBUG << "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 std::cerr << "SamplePlayer::searchSamples: Directory is \"" 367 DEBUG << "SamplePlayer::searchSamples: Directory is \""
368 << m_sampleDir.toLocal8Bit().data() << "\"" << std::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
373 for (unsigned int i = 0; i < dir.count(); ++i) { 373 for (unsigned int i = 0; i < dir.count(); ++i) {