made MidiEventTypes-enum conform coding-style, i.e. MidiNoteOn instead of NOTE_ON etc.

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1091 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-07 22:14:25 +00:00
parent 15794c095d
commit 280d9bdcc0
15 changed files with 133 additions and 120 deletions

View File

@@ -262,11 +262,11 @@ void vestigeInstrument::playNote( notePlayHandle * _n, bool, sampleFrame * )
const int k = getInstrumentTrack()->masterKey( _n );
if( m_runningNotes[k] > 0 )
{
m_plugin->enqueueMidiEvent( midiEvent( NOTE_OFF, 0,
m_plugin->enqueueMidiEvent( midiEvent( MidiNoteOff, 0,
k, 0 ), 0 );
}
++m_runningNotes[k];
m_plugin->enqueueMidiEvent( midiEvent( NOTE_ON, 0, k,
m_plugin->enqueueMidiEvent( midiEvent( MidiNoteOn, 0, k,
_n->getVolume() ), _n->offset() );
// notify when the handle stops, call to deleteNotePluginData
_n->m_pluginData = _n;
@@ -285,8 +285,8 @@ void vestigeInstrument::deleteNotePluginData( notePlayHandle * _n )
const int k = getInstrumentTrack()->masterKey( _n );
if( --m_runningNotes[k] <= 0 )
{
m_plugin->enqueueMidiEvent( midiEvent( NOTE_OFF, 0, k,
0 ), 0 );
m_plugin->enqueueMidiEvent(
midiEvent( MidiNoteOff, 0, k, 0 ), 0 );
}
}
m_pluginMutex.unlock();
@@ -488,8 +488,8 @@ void vestigeInstrumentView::noteOffAll( void )
{
for( int key = 0; key < NumKeys; ++key )
{
m_vi->m_plugin->enqueueMidiEvent( midiEvent( NOTE_OFF, 0,
key, 0 ), 0 );
m_vi->m_plugin->enqueueMidiEvent(
midiEvent( MidiNoteOff, 0, key, 0 ), 0 );
}
}
m_vi->m_pluginMutex.unlock();

View File

@@ -365,7 +365,7 @@ void remoteVSTPlugin::enqueueMidiEvent( const midiEvent & _event,
lock();
writeValueS<Sint16>( VST_ENQUEUE_MIDI_EVENT );
writeValueS<midiEventTypes>( _event.m_type );
writeValueS<MidiEventTypes>( _event.m_type );
writeValueS<Sint8>( _event.m_channel );
writeValueS<Uint16>( _event.m_data.m_param[0] );
writeValueS<Uint16>( _event.m_data.m_param[1] );

View File

@@ -515,7 +515,7 @@ void VSTPlugin::enqueueMidiEvent( const midiEvent & _event,
event.midiData[0] = _event.m_type + _event.m_channel;
switch( _event.m_type )
{
case PITCH_BEND:
case MidiPitchBend:
event.midiData[1] = _event.m_data.m_param[0] & 0x7f;
event.midiData[2] = _event.m_data.m_param[0] >> 7;
break;
@@ -1208,8 +1208,8 @@ int main( void )
case VST_ENQUEUE_MIDI_EVENT:
{
midiEventTypes type =
readValue<midiEventTypes>();
MidiEventTypes type =
readValue<MidiEventTypes>();
Sint8 channel = readValue<Sint8>();
Uint16 param1 = readValue<Uint16>();
Uint16 param2 = readValue<Uint16>();