summaryrefslogtreecommitdiff
path: root/src/audiofile.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-01-12 16:31:36 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-01-12 16:31:36 +0100
commit5e4cb10f72ef69d73fbd2c1bc42465c9111a4c41 (patch)
treefc830f6272849d78cf97d7645dd6dabb483b2f23 /src/audiofile.cc
parentec9148f95b0c47c8eecf26f6f2f16c1db558a3b9 (diff)
Fix memory leak when unloading a drumkit.
Diffstat (limited to 'src/audiofile.cc')
-rw-r--r--src/audiofile.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audiofile.cc b/src/audiofile.cc
index 61b49e9..018b7fb 100644
--- a/src/audiofile.cc
+++ b/src/audiofile.cc
@@ -33,6 +33,7 @@
AudioFile::AudioFile(std::string filename)
{
+ //printf("new AudioFile %p\n", this);
this->filename = filename;
data = NULL;
@@ -43,6 +44,7 @@ AudioFile::AudioFile(std::string filename)
AudioFile::~AudioFile()
{
+ //printf("delete AudioFile %p\n", this);
unload();
}
@@ -62,7 +64,7 @@ void AudioFile::load()
SF_INFO sf_info;
SNDFILE *fh = sf_open(filename.c_str(), SFM_READ, &sf_info);
if(!fh) {
- printf("Load error...\n");
+ printf("SNDFILE Error (%s): %s\n", filename.c_str(), sf_strerror(fh));
return;
}