We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1767

Summary: Pause music pauses all sounds: audio:pauseBackgroundTrack mutes all sound in windows
Product: SDL_mixer Reporter: Maarten Peters <maartenpeters>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: adam, admin
Version: 1.2.12   
Hardware: x86   
OS: Windows 7   

Description Maarten Peters 2013-03-22 09:30:03 UTC
I'm one of the developers of CorsixTH (http://code.google.com/p/corsix-th/) and we use SDL_mixer for the in-game sounds and music. 

We're currently having the problem that when we pause the music througt the ''jukebox'' in-game (Options>Jukebox) we also don't here the sounds from patients and doctors (like doors, ringing of the phone etc.) See here: http://code.google.com/p/corsix-th/issues/detail?id=1503&q=music.

One of our developers has disabled this option, because of this bug: http://code.google.com/p/corsix-th/source/detail?r=2055. Make the changes at audio.lua undone and you see this bug to occur.
Comment 1 Sam Lantinga 2013-03-23 16:10:49 UTC
Is this problem specific to Windows 7?  Is midiOutSetVolume() setting the system wide volume?  If that's the case, the only solution I can think of is to use the built-in timidity support for software midi instead.
Comment 2 Maarten Peters 2013-03-23 16:28:22 UTC
No, this bug also occurs on Windows Vista. I asked the question to one of the other developers.
Comment 3 Maarten Peters 2013-03-23 17:31:03 UTC
The answer: Yes it is and it was a known issue. I think the set volume in that funtion may not be necessary but there was a comment that it works around another bug.
Comment 4 Maarten Peters 2013-03-24 05:03:30 UTC
''Our pause function does set the volume to work around 
another bug. I don't know if the other bug still exists so maybe we can 
get rid of just that line.'' Maybe this resolves our problem?
Comment 5 Vitaly Novichkov 2019-08-21 10:30:03 UTC
> midiOutSetVolume()

Yeah, for this thing I have this ticket: https://bugzilla.libsdl.org/show_bug.cgi?id=3495
The only way to fix this - make a workaround: instead of touching `midiOutSetVolume()` call, send MIDI volume to all channels and apply a factor to ALL volume change events (CC7). So, this will need tracking of all CC7 are passing to correctly send the changed volume to MIDI output.