summaryrefslogtreecommitdiff
path: root/src/sample.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sample.cc')
-rw-r--r--src/sample.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sample.cc b/src/sample.cc
index f0bb099..be897c7 100644
--- a/src/sample.cc
+++ b/src/sample.cc
@@ -47,8 +47,19 @@ void Sample::addAudioFile(Channel *c, AudioFile *a)
AudioFile *Sample::getAudioFile(Channel *c)
{
+ /*
if(audiofiles.find(c) == audiofiles.end()) return NULL;
return audiofiles[c];
+ */
+
+ AudioFiles::iterator i = audiofiles.begin();
+ while(i != audiofiles.end()) {
+ Channel *ch = i->first;
+ if(c->num == ch->num) return i->second;
+ i++;
+ }
+
+ return NULL;
}
#ifdef TEST_SAMPLE