From dd64f50a05b2834014582134e13daf8575c70757 Mon Sep 17 00:00:00 2001 From: - Date: Fri, 10 May 2013 11:15:23 +0200 Subject: Outcommented lazy loading of sound files. --- src/audiofile.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/audiofile.cc b/src/audiofile.cc index b3b47e8..b0180cb 100644 --- a/src/audiofile.cc +++ b/src/audiofile.cc @@ -168,9 +168,12 @@ void AudioFile::reset() { void AudioFile::load() { + /* + Lazy load of drum kits init(); return; -/* + */ + if(data) return; SF_INFO sf_info; @@ -182,8 +185,7 @@ void AudioFile::load() size = sf_info.frames; - data = new sample_t[size]; - + sample_t* data = new sample_t[size]; size = sf_read_float(fh, data, size); printf("Loaded %d samples %p\n", size, this); @@ -191,9 +193,10 @@ void AudioFile::load() sf_close(fh); mutex.lock(); + this->data = data; is_loaded = true; mutex.unlock(); -*/ + //DEBUG(audiofile, "Loading of %s completed.\n", filename.c_str()); } -- cgit v1.2.3