Skip to content

Hardware MIDI - Sound Continues After Game Window Closed #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ghost opened this issue Jul 17, 2019 · 1 comment
Open

Hardware MIDI - Sound Continues After Game Window Closed #21

ghost opened this issue Jul 17, 2019 · 1 comment
Assignees

Comments

@ghost
Copy link

ghost commented Jul 17, 2019

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

@dreamer dreamer self-assigned this Jul 17, 2019
@dreamer
Copy link
Owner

dreamer commented Jul 18, 2019

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:

  • ALSA (perhaps there is some easy way to instruct it to fixup stream state) - but I consider it a long-shot
  • DOSBox - I think it's likely a better place to fix it - dosbox could (hopefully already does) keep track of midi stream and cleanup on exit and after misbehaving DOS applications,

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.

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

No branches or pull requests

1 participant