Fix audio thread stuttering with large midi messages on Windows#1104
Open
JeanVonVarr wants to merge 1 commit intokushview:mainfrom
Open
Fix audio thread stuttering with large midi messages on Windows#1104JeanVonVarr wants to merge 1 commit intokushview:mainfrom
JeanVonVarr wants to merge 1 commit intokushview:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
Thanks for this amazing software!
This PR fixes an audio thread stuttering problem when sending a large midi message on Windows.
When sending a thousand bytes SysEx, the audio thread was kept busy by
midiOut->sendBlockOfMessagesNow().This causes a stuttering of the audio playback, because a 1000 bytes SysEx takes around 32ms to be sent,
hence blocking the audio thread. This is all the more noticeable with several-thousands-bytes SysEx.
This PR almost reverts cf2238c, but uses
Time::getMillisecondCounter()instead ofTime::getMillisecondCounterHiRes(), as suggested by this juce discussion.Indeed,
ScheduledEventThread::run, which is in charge of sending the midi messages on time, usesTime::getMillisecondCounter()to determine the current timestamp.I am pretty confident this 'properly' resolves the original commit's issue #493, but I am not able to replicate the exact same setup to validate this. I, however, did not notice any side-effect during my testing.
Cheers,