From bc7d41279222dbd07f8e6f02f067347d10c69f33 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 16 May 2013 19:26:37 +0200 Subject: Change printf's to DEBUG. --- src/drumkitloader.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/drumkitloader.cc') diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc index 6516c7d..41b56a1 100644 --- a/src/drumkitloader.cc +++ b/src/drumkitloader.cc @@ -82,8 +82,10 @@ void DrumKitLoader::loadKit(DrumKit *kit) semaphore.post(); } -void DrumKitLoader::prepare(AudioFile* af) { - printf("Preparing audiofile %p (%d in queue)\n", af, load_queue.size()); +void DrumKitLoader::prepare(AudioFile* af) +{ + DEBUG(loader, "Preparing audiofile %p (%d in queue)\n", + af, load_queue.size()); mutex.lock(); af->ref_count++; load_queue.push_back(af); @@ -97,7 +99,8 @@ void DrumKitLoader::prepare(AudioFile* af) { semaphore.post(); } -void DrumKitLoader::reset(AudioFile* af) { +void DrumKitLoader::reset(AudioFile* af) +{ mutex.lock(); af->ref_count--; reset_queue.push_back(af); @@ -125,7 +128,7 @@ void DrumKitLoader::thread_main() } if(!load_queue.empty()) { - printf("Loading remaining of audio file\n"); + DEBUG(loader, "Loading remaining of audio file\n"); AudioFile* af = load_queue.front(); mutex.lock(); load_queue.pop_front(); @@ -143,7 +146,7 @@ void DrumKitLoader::thread_main() mutex.unlock(); } else { // Initialize drum kit - printf("Initializing drum kit\n"); + DEBUG(loader, "Initializing drum kit\n"); unsigned int count = 0; if(kit && !kit->isValid()) goto finish; -- cgit v1.2.3