diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2018-07-07 02:03:01 +0200 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2018-07-07 02:40:02 +0200 |
commit | 7cb0fe9dad9f7ef24d1142d866450305102bf3a9 (patch) | |
tree | 392c55537731346ec8dc65a9f93afb35fbe4f73d /src/midi_sequencer.hpp | |
parent | 63f0c95a978902e0896513ca4c7e7e3907da7b9d (diff) | |
download | libADLMIDI-7cb0fe9dad9f7ef24d1142d866450305102bf3a9.tar.gz libADLMIDI-7cb0fe9dad9f7ef24d1142d866450305102bf3a9.tar.bz2 libADLMIDI-7cb0fe9dad9f7ef24d1142d866450305102bf3a9.zip |
sequencer API to turn tracks on/off/solo
Diffstat (limited to 'src/midi_sequencer.hpp')
-rw-r--r-- | src/midi_sequencer.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/midi_sequencer.hpp b/src/midi_sequencer.hpp index 6eeefa9..71e06b5 100644 --- a/src/midi_sequencer.hpp +++ b/src/midi_sequencer.hpp @@ -343,6 +343,11 @@ private: //! Are loop points invalid? bool m_invalidLoop; /*Loop points are invalid (loopStart after loopEnd or loopStart and loopEnd are on same place)*/ + //! Whether the nth track has playback disabled + std::vector<bool> m_trackDisable; + //! Index of solo track, or max for disabled + size_t m_trackSolo; + //! File parsing errors string (adding into m_errorString on aborting of the process) std::string m_parsingErrorsString; //! Common error string @@ -365,6 +370,26 @@ public: FileFormat getFormat(); /** + * @brief Returns the number of tracks + * @return Track count + */ + size_t getTrackCount() const; + + /** + * @brief Sets whether a track is playing + * @param track Track identifier + * @param enable Whether to enable track playback + * @return true on success, false if there was no such track + */ + bool setTrackEnabled(size_t track, bool enable); + + /** + * @brief Enables or disables solo on a track + * @param track Identifier of solo track, or max to disable + */ + void setSoloTrack(size_t track); + + /** * @brief Get the list of CMF instruments (CMF only) * @return Array of raw CMF instruments entries */ |