Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,8 +829,12 @@ static void midiInputCallback( const MIDIPacketList *list, void *procRef, void *
}
else {
// As long as we haven't reached our queue size limit, push the message.
if ( !data->queue.push( message ) )
if (!data->queue.push(message))
{
#if defined(__RTMIDI_DEBUG__)
std::cerr << "\nMidiInCore: message queue limit reached!!\n\n";
#endif
}
}
message.bytes.clear();
}
Expand Down Expand Up @@ -888,8 +892,12 @@ static void midiInputCallback( const MIDIPacketList *list, void *procRef, void *
}
else {
// As long as we haven't reached our queue size limit, push the message.
if ( !data->queue.push( message ) )
if (!data->queue.push(message))
{
#if defined(__RTMIDI_DEBUG__)
std::cerr << "\nMidiInCore: message queue limit reached!!\n\n";
#endif
}
}
message.bytes.clear();
}
Expand Down Expand Up @@ -1725,8 +1733,12 @@ static void *alsaMidiHandler( void *ptr )
}
else {
// As long as we haven't reached our queue size limit, push the message.
if ( !data->queue.push( message ) )
if (!data->queue.push(message))
{
#if defined(__RTMIDI_DEBUG__)
std::cerr << "\nMidiInAlsa: message queue limit reached!!\n\n";
#endif
}
}
}

Expand Down Expand Up @@ -2529,8 +2541,12 @@ static void CALLBACK midiInputCallback( HMIDIIN /*hmin*/,
}
else {
// As long as we haven't reached our queue size limit, push the message.
if ( !data->queue.push( apiData->message ) )
if (!data->queue.push(apiData->message))
{
#if defined(__RTMIDI_DEBUG__)
std::cerr << "\nMidiInWinMM: message queue limit reached!!\n\n";
#endif
}
}

// Clear the vector for the next input message.
Expand Down Expand Up @@ -3070,8 +3086,12 @@ static int jackProcessIn( jack_nframes_t nframes, void *arg )
}
else {
// As long as we haven't reached our queue size limit, push the message.
if ( !rtData->queue.push( message ) )
if (!rtData->queue.push(message))
{
#if defined(__RTMIDI_DEBUG__)
std::cerr << "\nMidiInJack: message queue limit reached!!\n\n";
#endif
}
}
}
}
Expand Down