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/instrumentparser.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/instrumentparser.cc') diff --git a/src/instrumentparser.cc b/src/instrumentparser.cc index 1445cbe..15195e1 100644 --- a/src/instrumentparser.cc +++ b/src/instrumentparser.cc @@ -29,13 +29,15 @@ #include #include +#include + #include "path.h" InstrumentParser::InstrumentParser(const std::string &file, Instrument &i) : instrument(i) { s = NULL; - // printf("Parsing instrument in %s\n", file.c_str()); + // DEBUG(instrparser,"Parsing instrument in %s\n", file.c_str()); path = getPath(file); fd = fopen(file.c_str(), "r"); if(!fd) return; @@ -62,7 +64,7 @@ void InstrumentParser::startTag(std::string name, if(name == "sample") { if(attr.find("name") == attr.end()) { - printf("Missing required attribute 'name'.\n"); + DEBUG(instrparser,"Missing required attribute 'name'.\n"); return; } s = new Sample(attr["name"]); @@ -70,17 +72,17 @@ void InstrumentParser::startTag(std::string name, if(name == "audiofile") { if(s == NULL) { - printf("Missing Sample!\n"); + DEBUG(instrparser,"Missing Sample!\n"); return; } if(attr.find("file") == attr.end()) { - printf("Missing required attribute 'file'.\n"); + DEBUG(instrparser,"Missing required attribute 'file'.\n"); return; } if(attr.find("channel") == attr.end()) { - printf("Missing required attribute 'channel'.\n"); + DEBUG(instrparser,"Missing required attribute 'channel'.\n"); return; } @@ -96,12 +98,12 @@ void InstrumentParser::startTag(std::string name, if(name == "velocity") { if(attr.find("lower") == attr.end()) { - printf("Missing required attribute 'lower'.\n"); + DEBUG(instrparser,"Missing required attribute 'lower'.\n"); return; } if(attr.find("upper") == attr.end()) { - printf("Missing required attribute 'upper'.\n"); + DEBUG(instrparser,"Missing required attribute 'upper'.\n"); return; } @@ -111,7 +113,7 @@ void InstrumentParser::startTag(std::string name, if(name == "sampleref") { if(attr.find("name") == attr.end()) { - printf("Missing required attribute 'name'.\n"); + DEBUG(instrparser,"Missing required attribute 'name'.\n"); return; } @@ -126,7 +128,7 @@ void InstrumentParser::startTag(std::string name, } if(sample == NULL) { - printf("Samplref pointed at non-existing sample.\n"); + DEBUG(instrparser,"Samplref pointed at non-existing sample.\n"); return; } @@ -138,7 +140,7 @@ void InstrumentParser::endTag(std::string name) { if(name == "sample") { if(s == NULL) { - printf("Missing Sample.\n"); + DEBUG(instrparser,"Missing Sample.\n"); return; } -- cgit v1.2.3