Improve midi responsiveness and add error checking
Bug #635872 reported by
Guy Martin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Fix Released
|
Medium
|
Guy Martin | ||
1.8 |
Fix Released
|
Medium
|
Guy Martin |
Bug Description
The attached patch does 2 things :
- add error checking when reading midi messages
- only sleep if there are no new midi messages after processing the current ones
This should slightly improve responsiveness when a lot of midi messages are being received.
When adding some debugging, it's mostly useful for sliders which generate a lot of messages.
Related branches
lp://staging/mixxx/1.8
(Merged)
Changed in mixxx: | |
status: | Confirmed → Fix Committed |
Changed in mixxx: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hey Guy,
Thanks for the patch! A couple notes:
The check for events coming during the processing time should be done within the if (m_pInputStream) block in case m_pInputStream is NULL.
The m_sPMLock is not unlocked before usleep'ing, so multiple PortMIDI devices may fight over this lock since it is shared across all PortMIDI devices.
Are all PortMIDI errors (Pm_Poll or Pm_Read returning <0) unrecoverable? Given the error checking you added, it will break out of the processing loop, causing the device to need to be re-enabled in the preferences.
I've fixed 1+2 and once I learn the answer to 3 I'll commit this.
RJ
Thanks,
RJ