dreamer / boxtron

Steam Play compatibility tool to run DOS games using native Linux DOSBox
https://luxtorpeda.gitlab.io/
GNU General Public License v2.0
412 stars 5 forks source link

Hardware MIDI - Sound Continues After Game Window Closed #21

Open ghost opened 5 years ago

ghost commented 5 years ago

When playing MIDI audio through my USB Casio Keyboard, sound continues to play after the DOSBox window is closed.

dreamer commented 5 years ago

I am not familiar with MIDI stream format itself, but from what I've read so far: on a basic level, it transfers information "note on/off". I presume, that when the stream is broken while notes are still on - then synthesiser will think it is supposed to emit sound until told otherwise. Timidity works around this somehow (my speculation would be that it cleans up when nothing happens after several cycles from timer sequencer) and stops outputting sound when nothing happens, but this issue can be reproduced in Fluidsynth pretty easily.

So this is reproducible both in hardware and software; there are two components that need to be investigated for a solution:

Most likely I will work on patches to dosbox and do my best to make them accepted upstream. If this will turn out impossible in a timely manner, then alternative solutions (such as providing our own build of dosbox against steam runtime) might be necessary.

This bug is to remain open to track progress in steam-dos and other projects until the issue is fixed.