@@ -723,24 +723,20 @@ inline bool MidiInterface<Transport, Settings, Platform>::read(Channel inChannel
723
723
sendActiveSensing ();
724
724
}
725
725
726
+ // Once an Active Sensing message is received, the unit will begin monitoring
727
+ // the intervalbetween all subsequent messages. If there is an interval of 420 ms
728
+ // or longer betweenmessages while monitoring is active, the same processing
729
+ // as when All Sound Off, All Notes Off,and Reset All Controllers messages are
730
+ // received will be carried out. The unit will then stopmonitoring the message interval.
726
731
if (Settings::UseReceiverActiveSensing && mReceiverActiveSensingActive )
727
732
{
728
733
if ((Platform::now () - mLastMessageReceivedTime > Settings::ReceiverActiveSensingTimeout))
729
734
{
730
- // Once an Active Sensing message is received, the unit will begin monitoring
731
- // the intervalbetween all subsequent messages. If there is an interval of 420 ms
732
- // or longer betweenmessages while monitoring is active, the same processing
733
- // as when All Sound Off, All Notes Off,and Reset All Controllers messages are
734
- // received will be carried out. The unit will then stopmonitoring the message interval.
735
735
mReceiverActiveSensingActive = false ;
736
736
737
- // its up to the error handler to send the stop processing messages
737
+ // its up to the handler to send the stop processing messages
738
738
// (also, no clue what the channel is on which to send them)
739
-
740
- // no need to check if bit is already set, it is not (due to the mActiveSensingActive switch)
741
- mLastError |= 1UL << ErrorActiveSensingTimeout; // set the ErrorActiveSensingTimeout bit
742
- if (mErrorCallback )
743
- mErrorCallback (mLastError );
739
+ mActiveSensingTimeoutCallback (true );
744
740
}
745
741
}
746
742
#endif
@@ -759,17 +755,9 @@ inline bool MidiInterface<Transport, Settings, Platform>::read(Channel inChannel
759
755
760
756
if (mMessage .type == ActiveSensing && !mReceiverActiveSensingActive )
761
757
{
762
- // Once an Active Sensing message is received, the unit will begin monitoring
763
- // the intervalbetween all subsequent messages. If there is an interval of 420 ms
764
- // or longer betweenmessages while monitoring is active, the same processing
765
- // as when All Sound Off, All Notes Off,and Reset All Controllers messages are
766
- // received will be carried out. The unit will then stopmonitoring the message interval.
767
758
mReceiverActiveSensingActive = true ;
768
759
769
- // Clear the ErrorActiveSensingTimeout bit
770
- mLastError &= ~(1UL << ErrorActiveSensingTimeout);
771
- if (mErrorCallback )
772
- mErrorCallback (mLastError );
760
+ mActiveSensingTimeoutCallback (false );
773
761
}
774
762
}
775
763
0 commit comments