Skip to content

AlsaMIDIDevice and CoreMIDIDevice: bug fixes and improvements - #18

Merged
the-phinet merged 12 commits into
UZDoom:trunkfrom
charlesthobe:pr
Aug 7, 2026
Merged

the-phinet merged 12 commits into
UZDoom:trunkfrom
charlesthobe:pr

Conversation

@charlesthobe

@charlesthobe charlesthobe commented Jun 26, 2026 •

Copy link
Copy Markdown

Changes:

  1. CoreMidi has been moving toward MIDI 2.0 and using Universal Midi Packets (UMPs) for MIDI 1.0 and 2.0 to the point that they marked functions that deal with raw MIDI 1.0 data as deprecated.
    with this PR the code packages raw midi data into UMPs and uses the newer non-deprecated functions.

  2. Event tick position calculation was not accurate in AlsaMIDIDevice due to sign conversion and too small of a data type to ensure the value of thread::sleep timer is correct, this actually breaks playback of freedoom phase 2 0.13.0 map10 after 5 minutes, this has been fixed, Also a theoretical similar issue that could occur in CoreMIDIDevice has been mitigated.

  3. Rest of the changes are less important or just coding style cleanups

Comment thread source/mididevices/music_coremidi_mididevice.mm Outdated
Comment thread source/mididevices/music_coremidi_mididevice.mm Outdated
@charlesthobe

Copy link
Copy Markdown
Author

There are news that some functions used in the CoreMidi backend are deprecated so unfortunately like always this PR is gonna get out of scope

@charlesthobe
charlesthobe force-pushed the pr branch 4 times, most recently from 2b2ffe0 to a972d36 Compare June 27, 2026 04:21
@charlesthobe

Copy link
Copy Markdown
Author

https://datahacker.blog/files/86/MIDI-20-Specifications/96/UMP-and-MIDI-20-Protocol-Specification.pdf
For future reference, this is more helpful than anything else so far.

@charlesthobe
charlesthobe force-pushed the pr branch 2 times, most recently from 76cf1cc to 246e1da Compare June 27, 2026 22:26
@charlesthobe charlesthobe changed the title CoreMIDIDevice: clear up some definitions CoreMIDIDevice: substitute deprecated functions Jun 27, 2026
@charlesthobe
charlesthobe force-pushed the pr branch 16 times, most recently from f2570ba to a812344 Compare June 28, 2026 13:06
@charlesthobe
charlesthobe force-pushed the pr branch 10 times, most recently from c168863 to be3eeed Compare July 5, 2026 14:46
@Gutawer

Gutawer commented Jul 5, 2026

Copy link
Copy Markdown

Seems like this PR now does a fair bit more than its title and description would imply (correct me if I'm wrong)? Would kinda prefer multiple PRs over a singular one fixing multiple things but would also be happy for the title and description to just be updated. Without that context it's kinda hard to review

@the-phinet

Copy link
Copy Markdown
Member

I'd like to add on to Guta's comment above that pushing multiple times after the pr is marked ready for review can make things harder to review, too. Occasional pushes (or when a change is requested) are a-okay, but many pushes suggest that the pr is still in heavy development, meaning it's not ready for review. It's not at all a big deal, but it is something to keep in mind for the future.

@charlesthobe charlesthobe changed the title CoreMIDIDevice: substitute deprecated functions AlsaMIDIDevice and CoreMIDIDevice: bug fixes and improvements Jul 5, 2026
@charlesthobe

Copy link
Copy Markdown
Author

idk what the problem with github CI is, it's not even trying to build...

@the-phinet

the-phinet commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

Looks like actions are just kinda very down right now. I've never seen an incident log this long before...

image

https://www.githubstatus.com/

Edit: Looks like it's been resolved: https://www.githubstatus.com/incidents/qcvjkzcs7j74

the-phinet
the-phinet previously approved these changes Aug 7, 2026

@the-phinet the-phinet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This all looks good to me. I sincerely apologize for how long it took for any of us to look at this

Sidenote: I really appreciate your attention to detail and code quality

@charlesthobe

Copy link
Copy Markdown
Author

No worries and thank you

now it's set in milliseconds while avoiding runtime convertion
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.

3 participants