summaryrefslogtreecommitdiff
path: root/src/audiofile.cc
diff options
context:
space:
mode:
authordeva <deva>2009-02-20 17:22:14 +0000
committerdeva <deva>2009-02-20 17:22:14 +0000
commitfda7eaa26e0d796cac151275fc5b9bcb7b312c2b (patch)
tree7979c3678a08439218024c38cf04cc69d6dbbb10 /src/audiofile.cc
parent3a2fbb13a8571832fd8b7bd7b3e378b3f38814b2 (diff)
Incremented version number.
Diffstat (limited to 'src/audiofile.cc')
-rw-r--r--src/audiofile.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/audiofile.cc b/src/audiofile.cc
index c3dba3c..b8b4ef9 100644
--- a/src/audiofile.cc
+++ b/src/audiofile.cc
@@ -31,12 +31,22 @@
#include <sndfile.h>
-AudioFile::AudioFile(std::string filename, bool preload)
+AudioFile::AudioFile(std::string filename, bool preload, int min_velocity)
{
this->filename = filename;
data = NULL;
size = 0;
- if(preload) load();
+
+ char *p = (char*)filename.c_str() + filename.length() - 6;
+ int num = atoi(p);
+ if(num < 0) num *= -1;
+
+ printf("%s", filename.c_str());
+ if(preload && num >= min_velocity) {
+ printf(" ... loading");
+ load();
+ }
+ printf("\n");
}
AudioFile::~AudioFile()