From 0e8d586619e09db50a64cfcacda6267e6cb21214 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 10 Jul 2015 09:33:55 +0200 Subject: Fix channel swapping when playing samples after the initially loaded. --- src/audiofile.h | 3 ++- src/drumgizmo.cc | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/audiofile.h b/src/audiofile.h index 5f93584..aefb8d6 100644 --- a/src/audiofile.h +++ b/src/audiofile.h @@ -99,10 +99,11 @@ public: Mutex mutex; + int filechannel; + private: void *magic; volatile bool is_loaded; - int filechannel; }; #endif/*__DRUMGIZMO_AUDIOFILE_H__*/ diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 28ac2c6..e7843d4 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -412,8 +412,8 @@ void DrumGizmo::getSamples(int ch, int pos, sample_t *s, size_t sz) if(evt->cache_id == CACHE_NOID) { size_t initial_chunksize = (pos + sz) - evt->offset; - evt->buffer = - cacheManager.open(af, initial_chunksize, ch, evt->cache_id); + evt->buffer = cacheManager.open(af, initial_chunksize, + af->filechannel, evt->cache_id); evt->buffer_size = initial_chunksize; } -- cgit v1.2.3