summaryrefslogtreecommitdiff
path: root/src/drumkitloader.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-05-16 19:26:37 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-05-16 19:26:37 +0200
commitbc7d41279222dbd07f8e6f02f067347d10c69f33 (patch)
treef9eb86bf41430a749fbbf779207f49786922f690 /src/drumkitloader.cc
parent20c37dd67deaa52f32ab7cde142c0dc91db57650 (diff)
Change printf's to DEBUG.
Diffstat (limited to 'src/drumkitloader.cc')
-rw-r--r--src/drumkitloader.cc13
1 files changed, 8 insertions, 5 deletions
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;