Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
wesleyjohnson

Windows sound, any general fixes

Recommended Posts

With so many problems with windows sound lately, I am interested in any general fixes the port developers have found for Win7, and Win8.
My major problem is that I only have Win98, and XP (maybe) to test on.
DoomLegacy gets window's bug reports, but I cannot duplicate the problems.

Share this post


Link to post

I know nobody has posted and my technical knowledge on the subject is certainly limited when it comes to discussing the code itself, but I do know what Dr Sean did with Odamex (taking a cue from prboom I believe). He included the portmidi library with Odamex and it defaults to that (instead of sdl_mixer) on Windows. It controls the volume of the midi synth differently than sdl_mixer, although I think Sean also figured out how to fix it directly in sdl_mixer as well.

Share this post


Link to post

SDL mixer problems ... thanks. I can search for more information.
I don't suppose this has anything to do with music that stops and won't loop.

Share this post


Link to post

The most significant SDL_Mixer issue we're familiar with in Odamex is that when you ask SDL_Mixer to set the volume of MIDI playback, the volume for all sound in the game is set to that value under Vista/7.

When switching from playing a MIDI song to a non-MIDI song like OGG, SDL_Mixer will fade-out the MIDI song. This causes the volume of all sound in the game to be 0 until the next time the MIDI volume is adjusted (usually the next time a MIDI song is played).

The underlying cause of these issues is that Microsoft changed their paradigm for sound mixing in Vista/7 and have a separate mixer channel volume control for each application. Unfortunately, that means that both the MIDI music and sound effects share the same volume control and can not be controlled separately via the method SDL_Mixer uses to set MIDI volume (midiOutSetVolume).

In Odamex, we worked around these issues by writing a MIDI file player that sends MIDI events to a playback library (PortMidi) in realtime, allowing us to generate MIDI volume control events as needed.

Share this post


Link to post

Eternity, when running on Windows, now plays MIDI from a separate process, sending that process the MIDI data and play/pause/stop/volume commands via RPC. This automatically gives it its own independent mixer channel under the irreparably broken Vista sound engine.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×