Skip to content

Fix midi crash2#227

Open
simotek wants to merge 2 commits intodjdiskmachine:masterfrom
simotek:fix-midi-crash2
Open

Fix midi crash2#227
simotek wants to merge 2 commits intodjdiskmachine:masterfrom
simotek:fix-midi-crash2

Conversation

@simotek
Copy link

@simotek simotek commented Jan 30, 2026

Description

Use Mutex Locker for midi on X64

This commit protects the midi queue with a basic mutex locker on
X64. So far it seems like this keeps midi working, doesn't crash
or end up with audio hanging.

This is split into 2 commits, the first is just clang format, the best way to view the functional changes is by reviewing the commits individually particularly the second.

Type of change

How Has This Been Tested?

I tested this for a couple of days on my rg35xx with some additional changes for midi in, (my rg35xx is using a build that is identical to X64)

Test Configuration:

  • Hardware: rg35xx-plus
  • Test steps:
    • Ran with audio + midi for several hours, tried starting and stopping multiple times in between

Checklist:

  • I have performed a self-review of my code
  • I have commented particularly in hard-to-understand areas
  • I have updated CHANGELOG
  • I have updated docs/wiki/What-is-LittlePiggyTracker.md reflecting my changes
  • I have version bumped in sources/Application/Model/Project.h
  • My changes generate no new warnings (build without your change then apply your change to check this)

This commit protects the midi queue with a basic mutex locker on
X64. So far it seems like this keeps midi working, doesn't crash
or end up with audio hanging.
Copy link
Owner

@djdiskmachine djdiskmachine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising, will try it out!

@@ -105,31 +100,34 @@ void MidiService::Trigger() {

#ifndef _FEAT_MIDI_MULTITHREAD
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we removed it from the related makefile, we don't need this anymore?
Or does FEAT_MIDI_MULTITHREAD still serve some role that I'm just not understanding? =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random audio engine crash оn Linux

2 participants