summaryrefslogtreecommitdiff
path: root/src/audiofile.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-09-03 14:08:41 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-09-03 14:08:41 +0200
commit1c25d3a69ac27dc1f93bca3a71996e757b452c4b (patch)
treea67541f62bd35577003f812b35ab6a35098e36ae /src/audiofile.cc
parenta359d234ff53bcdab671faa169f45c4f14f5575d (diff)
Add bleed controls for the drumkit with priority over those set in the instrument files.
Diffstat (limited to 'src/audiofile.cc')
-rw-r--r--src/audiofile.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/audiofile.cc b/src/audiofile.cc
index a8e9d4a..c2c5cf9 100644
--- a/src/audiofile.cc
+++ b/src/audiofile.cc
@@ -35,11 +35,14 @@
#include <hugin.hpp>
-AudioFile::AudioFile(const std::string& filename, std::size_t filechannel, bool main)
+#include "channel.h"
+
+AudioFile::AudioFile(const std::string& filename, std::size_t filechannel,
+ InstrumentChannel* instrument_channel)
: filename(filename)
, filechannel(filechannel)
- , main(main)
, magic{this}
+ , instrument_channel(instrument_channel)
{
}
@@ -151,3 +154,14 @@ bool AudioFile::isLoaded() const
{
return is_loaded;
}
+
+main_state_t AudioFile::mainState() const
+{
+ if(instrument_channel == nullptr)
+ {
+ DEBUG(audiofile, "no instrument_channel!");
+ return main_state_t::unset;
+ }
+
+ return instrument_channel->main;
+}