NotePlayHandle: added property to track origin

Using the origin property we can track where a NotePlayHandle instance
originates from (Pattern, MIDI, ...) and build new functions around this.
This commit is contained in:
Tobias Doerffel
2014-01-26 16:44:54 +01:00
parent 7103bb31d6
commit 725ff59f0e
2 changed files with 16 additions and 3 deletions

View File

@@ -48,12 +48,22 @@ public:
void * m_pluginData;
basicFilters<> * m_filter;
// specifies origin of NotePlayHandle
enum Origins
{
OriginPattern, /*! playback of a note from a pattern */
OriginMidiInput, /*! playback of a MIDI note input event */
OriginCount
};
typedef Origins Origin;
notePlayHandle( InstrumentTrack * _instrument_track,
const f_cnt_t _offset,
const f_cnt_t _frames, const note & _n,
notePlayHandle * _parent = NULL,
const bool _part_of_arp = false,
int midiEventChannel = -1 );
int midiEventChannel = -1,
Origin origin = OriginPattern );
virtual ~notePlayHandle();
virtual void setVolume( const volume_t volume = DefaultVolume );
@@ -281,6 +291,7 @@ private:
MidiTime m_songGlobalParentOffset;
const int m_midiChannel;
const Origin m_origin;
} ;