summaryrefslogtreecommitdiff
path: root/src/audiofile.cc
diff options
context:
space:
mode:
authordeva <deva>2008-12-21 19:24:29 +0000
committerdeva <deva>2008-12-21 19:24:29 +0000
commit5dcfbc8bd840dfd60573e038194a43b37ebfc047 (patch)
tree477b760b574a455441f6586123ff5adef6036c95 /src/audiofile.cc
parent90d1466d82e01fd7e5e2d2b49977e2dccaac9e33 (diff)
Added some cli options. Made preload optional on the commandline. Made chdir to drumkit file prior to loading of the samples.
Diffstat (limited to 'src/audiofile.cc')
-rw-r--r--src/audiofile.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/audiofile.cc b/src/audiofile.cc
index d52e010..c3dba3c 100644
--- a/src/audiofile.cc
+++ b/src/audiofile.cc
@@ -31,12 +31,12 @@
#include <sndfile.h>
-AudioFile::AudioFile(std::string filename)
+AudioFile::AudioFile(std::string filename, bool preload)
{
this->filename = filename;
data = NULL;
size = 0;
- // load();
+ if(preload) load();
}
AudioFile::~AudioFile()
@@ -57,8 +57,6 @@ void AudioFile::load()
{
if(data) return;
- filename = "/tmp/aasimonster/" + filename;
-
SF_INFO sf_info;
SNDFILE *fh = sf_open(filename.c_str(), SFM_READ, &sf_info);