File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -363,21 +363,16 @@ void CSoundBase::ParseMIDIMessage ( const CVector<uint8_t>& vMIDIPaketBytes )
363363 switch ( cCtrl.eType )
364364 {
365365 case Fader:
366+ case OurFader:
366367 {
367368 // we are assuming that the controller number is the same
368369 // as the audio fader index and the range is 0-127
369370 const int iFaderLevel = static_cast <int > ( static_cast <double > ( iValue ) / 127 * AUD_MIX_FADER_MAX );
371+ const int iTheChannel = cCtrl.eType == OurFader ? I_MY_CHANNEL : cCtrl.iChannel ;
370372
371373 // consider offset for the faders
372374
373- emit ControllerInFaderLevel ( cCtrl.iChannel , iFaderLevel );
374- }
375- break ;
376- case OurFader:
377- {
378- // special message about our own fader - emit a fader level whatever-it-is-called with channel id -1
379- const int iFaderLevel = static_cast <int > ( static_cast <double > ( iValue ) / 127 *AUD_MIX_FADER_MAX );
380- emit ControllerInFaderLevel ( I_MY_CHANNEL, iFaderLevel);
375+ emit ControllerInFaderLevel ( iTheChannel, iFaderLevel );
381376 }
382377 break ;
383378 case Pan:
You can’t perform that action at this time.
0 commit comments