From 15133bd77384e82953b7b86d7ece081341ece99b Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Wed, 20 Aug 2008 10:31:36 +0000 Subject: [PATCH] made midiPort of instrumentTrack accessible via getMidiPort() git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1445 0778d3d1-df1d-0410-868b-ea421aaaa00d --- include/instrument_track.h | 5 +++++ src/core/note_play_handle.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/instrument_track.h b/include/instrument_track.h index 3922396b0..6817310bb 100644 --- a/include/instrument_track.h +++ b/include/instrument_track.h @@ -131,6 +131,11 @@ public: return( &m_audioPort ); } + inline midiPort * getMidiPort( void ) + { + return( &m_midiPort ); + } + intModel * baseNoteModel( void ) { return( &m_baseNoteModel ); diff --git a/src/core/note_play_handle.cpp b/src/core/note_play_handle.cpp index fd1f4d179..7feb1b42b 100644 --- a/src/core/note_play_handle.cpp +++ b/src/core/note_play_handle.cpp @@ -101,7 +101,7 @@ notePlayHandle::notePlayHandle( instrumentTrack * _it, setFrames( _frames ); // send MIDI-note-on-event m_instrumentTrack->processOutEvent( midiEvent( MidiNoteOn, - m_instrumentTrack->m_midiPort.outputChannel(), + m_instrumentTrack->getMidiPort()->outputChannel(), key(), tLimit( (Uint16) ( ( getVolume() / 100.0f ) * @@ -303,7 +303,7 @@ void notePlayHandle::noteOff( const f_cnt_t _s ) m_instrumentTrack->m_soundShaping.releaseFrames() ); // send MIDI-note-off-event m_instrumentTrack->processOutEvent( midiEvent( MidiNoteOff, - m_instrumentTrack->m_midiPort.outputChannel(), + m_instrumentTrack->getMidiPort()->outputChannel(), key(), 0 ), midiTime::fromFrames( m_framesBeforeRelease, engine::framesPerTick() ) );