[Linux] Alsa Underrun with some MIDIs

Post bugs that have to do with sound and/or in-game music here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
User avatar
Hellser
Global Moderator
Posts: 2770
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

[Linux] Alsa Underrun with some MIDIs

Post by Hellser »

Just some background on my equipment first: I have a Roland UM-ONE II MIDI adapter connected to a SC-88ST - the adapter works on Linux as far as I can see (it can play Doom music, DN3D songs, and everything else I throw at it). GZDoom plays DOOM music fine as well. But playing DN3D songs or some regular MIDIs through GZDoom (and this happens on RAZE as well), Alsa craps out with the following error:

Code: Select all

Alsa sequencer underrun: -. . . ticks!
Alsa sequencer did not accept event: error -22!
I think this has to deal with Duke3D's music having multiple patches on the same channel which works without issue on sequencers which can ignore it. DN3D music uses EMIDI / Apogee Expanded MIDI, 3D Realm's in-house built sequencer to try and provide the "best" musical experience regardless of what soundcard / synth the user might have.

I don't know what ZMusic is doing, but I think it's trying to play all available channels and ZMusic is straight up starving or unable to send any information to Alsa to send to my UM-ONE II.

GZDoom is provided by AUR (gzdoom-git).
RAZE is also provided by AUR (raze).

I also provided a .txt file of the EMIDI API. Hopefully it could be of use to help identify these EMIDI songs (I think DN3D is the only one that is EMIDI) and to probably help turn off these extraneous channels.


Updated/Edit:
I think ZMusic is trying to send some sort of trash data to ALSA. Music works on every other source port I can throw at it - including DOSBOX. But whatever ZMusic is doing, it's doing it wrong. I've done what I can by examining the code. I'm not a programmer so I couldn't find anything too glaring. The ALSA code might need to be examined again and an examination of how the MIDI events is sent to ALSA is probably required. From what I was able to gather, ALSA is very strict on what get passes to it versus something like a softsynth.
Attachments
Emidi11.txt
Apogee Expanded MIDI V1.1 API Text File
(11.18 KiB) Downloaded 3 times
User avatar
Hellser
Global Moderator
Posts: 2770
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

Re: [Linux] Alsa Underrun with Duke3D Music

Post by Hellser »

I noticed an issue report on GitHub for ZMusic with others having this same exact issue.
Post Reply

Return to “Audio/Music Bugs”