diff options
Diffstat (limited to 'src/audiofile.cc')
-rw-r--r-- | src/audiofile.cc | 18 |
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; +} |