@@ -769,24 +769,20 @@ inline bool MidiInterface<Transport, Settings, Platform>::read(Channel inChannel
769769 sendActiveSensing ();
770770 }
771771
772+ // Once an Active Sensing message is received, the unit will begin monitoring
773+ // the intervalbetween all subsequent messages. If there is an interval of 420 ms
774+ // or longer betweenmessages while monitoring is active, the same processing
775+ // as when All Sound Off, All Notes Off,and Reset All Controllers messages are
776+ // received will be carried out. The unit will then stopmonitoring the message interval.
772777 if (Settings::UseReceiverActiveSensing && mReceiverActiveSensingActive )
773778 {
774779 if ((Platform::now () - mLastMessageReceivedTime > Settings::ReceiverActiveSensingTimeout))
775780 {
776- // Once an Active Sensing message is received, the unit will begin monitoring
777- // the intervalbetween all subsequent messages. If there is an interval of 420 ms
778- // or longer betweenmessages while monitoring is active, the same processing
779- // as when All Sound Off, All Notes Off,and Reset All Controllers messages are
780- // received will be carried out. The unit will then stopmonitoring the message interval.
781781 mReceiverActiveSensingActive = false ;
782782
783- // its up to the error handler to send the stop processing messages
783+ // its up to the handler to send the stop processing messages
784784 // (also, no clue what the channel is on which to send them)
785-
786- // no need to check if bit is already set, it is not (due to the mActiveSensingActive switch)
787- mLastError |= 1UL << ErrorActiveSensingTimeout; // set the ErrorActiveSensingTimeout bit
788- if (mErrorCallback )
789- mErrorCallback (mLastError );
785+ mActiveSensingTimeoutCallback (true );
790786 }
791787 }
792788 #endif
@@ -805,17 +801,9 @@ inline bool MidiInterface<Transport, Settings, Platform>::read(Channel inChannel
805801
806802 if (mMessage .type == ActiveSensing && !mReceiverActiveSensingActive )
807803 {
808- // Once an Active Sensing message is received, the unit will begin monitoring
809- // the intervalbetween all subsequent messages. If there is an interval of 420 ms
810- // or longer betweenmessages while monitoring is active, the same processing
811- // as when All Sound Off, All Notes Off,and Reset All Controllers messages are
812- // received will be carried out. The unit will then stopmonitoring the message interval.
813804 mReceiverActiveSensingActive = true ;
814805
815- // Clear the ErrorActiveSensingTimeout bit
816- mLastError &= ~(1UL << ErrorActiveSensingTimeout);
817- if (mErrorCallback )
818- mErrorCallback (mLastError );
806+ mActiveSensingTimeoutCallback (false );
819807 }
820808 }
821809
0 commit comments