Six Posted August 2, 2011 Hey folks, apologies if this is an issue already known. I've tried searching for results and i couldn't find any matches. Basically i have a sound and music adjustment problem when using source ports such as Chocolate and prBoom. When i turn the music bar right the way down to mute, for some reason the sound effects also mute with them, even if the sound effects bar is raised to its maximum level. However, if i mute the sound effects, the music still plays fine, so i'm not entirely sure of what is really happening here. Other source ports such as ZDoom don't have this issue, i can mute the music no problem without affecting the sound. As far as i know i'm running the latest versions of both source ports, and it's just one of those circumstances i've not been able to work my way around. Any ideas? It may not be strictly a source port issue since it happens on two accounts, but i've only had this issue with both source ports listed. 0 Share this post Link to post
Grazza Posted August 2, 2011 SDL (or SDL_mixer) bug, I think. Current Prboom+ has different music code (several options, including Fluidsynth) that avoids this problem. Try that and see if it solves your problem. 0 Share this post Link to post
Six Posted August 2, 2011 That's solved the issue with PrBoom+ thanks. I guess it's safe to assume Chocolate Doom has yet to fix this? Unless it has and i've completely overlooked it. 0 Share this post Link to post
natt Posted August 2, 2011 Chocolate Doom should be bug free if you use the OPL synth. Prboom-Plus should be bug free if you use OPL, Fluidsynth, or Portmidi. As far as fixing it for real (ie not just using different play code), it's more or less an SDL Mixer bug with Windows Vista/7. 0 Share this post Link to post
Average Posted August 2, 2011 There seems to be a similar bug that rears it's head in XP as well. It manifests itself as just running the music at full volume regardless of where the slider is though the SFX work fine. I presume it's the same bug. A pain in the neck! 0 Share this post Link to post
Ralphis Posted August 2, 2011 Average said:There seems to be a similar bug that rears it's head in XP as well. It manifests itself as just running the music at full volume regardless of where the slider is though the SFX work fine. I presume it's the same bug. A pain in the neck! I would guess that this could be caused by a midi device that does not respond to being turned down by the windows midi controls. You could check your midi options (in windows) and make sure it's set to Windows synth 0 Share this post Link to post
natt Posted August 2, 2011 Ralphis said:I would guess that this could be caused by a midi device that does not respond to being turned down by the windows midi controls. You could check your midi options (in windows) and make sure it's set to Windows synth Maybe he doesn't want to use the Windows GS Wavetable synth though. 0 Share this post Link to post
Average Posted August 2, 2011 ^ Hmm, that seems to have fixed the problem, thank you. I was using my external Creative sound card's soundfont. I messed around with Eternity as you can switch the SDL-Mixer on and off in-game. The music volume works with the MicrosoftGS font but not the Creative one... :( PS: Sorry Six for stealing your thread! 0 Share this post Link to post
Ralphis Posted August 2, 2011 natt said:Maybe he doesn't want to use the Windows GS Wavetable synth though. I understand that, but unfortunately it is an issue with a lot of wavetable synths that came out in the early 00s. Maybe there is a solution to this within the code, which you would surely know more about. I was only offering a solution to Average that I came across a few years ago so that he could play these engines NOW without having the music blasting. 0 Share this post Link to post
natt Posted August 2, 2011 Ralphis said:I understand that, but unfortunately it is an issue with a lot of wavetable synths that came out in the early 00s. Maybe there is a solution to this within the code, which you would surely know more about. I was only offering a solution to Average that I came across a few years ago so that he could play these engines NOW without having the music blasting. You are right of course, and I apologize. I have come to dislike sdl mixer quite a bit, and it makes me grumpy at times. 0 Share this post Link to post
shadow1013 Posted August 2, 2011 lol. thats why I made my own sound code for my linux port. SDL_mixer just seems to buggy for me 0 Share this post Link to post
Average Posted August 2, 2011 For the record I much prefer the Creative soundfont but if it's a choice between acceptable SF with no volume control and pretty rubbish sF with volume control, I'm afraid I'm going to suffer the rubbish one - at least until there's some kind of fix or work around... I'll finish this post later - my girlfriend is standing tapping her foot waiting on me to go out with her!!! *Slap....* :P 0 Share this post Link to post
natt Posted August 2, 2011 Average said:For the record I much prefer the Creative soundfont but if it's a choice between acceptable SF with no volume control and pretty rubbish sF with volume control, I'm afraid I'm going to suffer the rubbish one - at least until there's some kind of fix or work around... I'll finish this post later - my girlfriend is standing tapping her foot waiting on me to go out with her!!! *Slap....* :P For what it's worth, I looked at implementing a volume control of the sort I used for my own midi code in SDL_Mixer, and it would be possible, but some rather ugly code would have to be modified. What SDL_Mixer's mmsystem backend does is "pre-bake" an entire MIDI song into mmsystem-native structures at load time, and then it just runs through that with a callback while the song plays. So you can't add extra events into the stream while it plays (as you would need to do to if the user hits the master volume control in the middle of a song) without significant modification. Also, my impression of SDL_Mixer's development was "very stagnant", so any fix I made wouldn't likely make it back to mainline, which means I'd be stuck maintaining an SDL_Mixer branch, which opens a few more cans of worms. 0 Share this post Link to post
Kaiser Posted August 2, 2011 SDL_Mixer caused way too many headaches for me, so much that I decided to replace it entirely with Fluidsynth which is now the main API for handling all SFX and Music in my port. I really wish I've heard about Fluidsynth sooner. 0 Share this post Link to post
Average Posted August 2, 2011 ^ Indeed. I hope Fluidsynth ends up elbowing out SDL-Mixer. Ever since I tried it out in ZDoom a while back I've been very happy with it. It's also nice and easy to change soundfonts too. I know it's more resource heavy than SDL-Mixer but I think the overheads are worth it - especially as most people have at least dual core CPU's... 0 Share this post Link to post
Quasar Posted August 3, 2011 The OP's problem isn't a bug in SDL_mixer; it's a bug in Windows Vista and 7's system sound mixer which ties the volume of the Microsoft GS Synth to the application's digital audio output gain. The midiOutVolume API provided by the mmsystem library (aka MCI) is the only function called by SDL_mixer to set volume. It's MS's wavesynth code, which they re-implemented in the most lazy way possible for Vista, that is entirely at fault here. 0 Share this post Link to post
natt Posted August 3, 2011 Quasar said:The OP's problem isn't a bug in SDL_mixer; it's a bug in Windows Vista and 7's system sound mixer which ties the volume of the Microsoft GS Synth to the application's digital audio output gain. The midiOutVolume API provided by the mmsystem library (aka MCI) is the only function called by SDL_mixer to set volume. It's MS's wavesynth code, which they re-implemented in the most lazy way possible for Vista, that is entirely at fault here. Perhaps the original fault lies with Microsoft; but Windows Vista has been out for 5 years now, and if you can't fix an OS bug directly, you create a work-around where possible. Pointing fingers doesn't help. 0 Share this post Link to post
Quasar Posted August 3, 2011 natt said:Perhaps the original fault lies with Microsoft; but Windows Vista has been out for 5 years now, and if you can't fix an OS bug directly, you create a work-around where possible. Pointing fingers doesn't help. The only workaround is literally to add your own software synth. Any application using both the GS wavesynth and digital audio at the same time under the NT 6 platform will suffer this same fate. The real thing is that, as mentioned previously, SDL 1.2 is now frozen and hasn't been updated in forever - they are stuck in some kind of development hell on v1.3 instead. 0 Share this post Link to post
natt Posted August 3, 2011 Quasar said:The only workaround is literally to add your own software synth. I can't test it myself (no Vista/7 machine), but I've been informed that the workaround I coded into prboom-plus works. Give it a try! Any recent build should do; use portmidi music player option and this config file option: mus_extend_volume 0 You should be able to change both music and sfx volume in game without fraking anything up. 0 Share this post Link to post
Manc Posted August 3, 2011 natt said:...I've been informed that the workaround I coded into prboom-plus works. Give it a try! Any recent build should do; use portmidi music player option and this config file option: mus_extend_volume 0 You should be able to change both music and sfx volume in game without fraking anything up. That's fine, but how does that help sdl_mixer usage? That is what quasar is referring to. If your application only has sdl_mixer as an option, you're kinda screwed unless you add other midi options like prboom+ did. 0 Share this post Link to post
natt Posted August 3, 2011 Mancubus II said:That's fine, but how does that help sdl_mixer usage? That is what quasar is referring to. If your application only has sdl_mixer as an option, you're kinda screwed unless you add other midi options like prboom+ did. The same work around could have been applied to sdl_mixer. My post was in response to "The only workaround is literally to add your own software synth." 0 Share this post Link to post
wesleyjohnson Posted August 3, 2011 DoomLegacy has bug reports on unspecified Windows machines that sound similar. I will blame Vista and Win7, being that it looks like I cannot not do much about it by changing SDL calls. 0 Share this post Link to post
tempun Posted August 4, 2011 wesleyjohnson said:DoomLegacy has bug reports on unspecified Windows machines that sound similar. I will blame Vista and Win7, being that it looks like I cannot not do much about it by changing SDL calls. Pull in PrBoom+ sound code. It cannot be that difficult. (okay, just tedious.) 0 Share this post Link to post
Graf Zahl Posted August 4, 2011 Mancubus II said:If your application only has sdl_mixer as an option, you're kinda screwed unless you add other midi options like prboom+ did. Well, sorry to be harsh - but since sdl_mixer can be considered broken by now one can consider any application that requires it broken as well. Time to ditch it, I say. 0 Share this post Link to post
RestlessRodent Posted August 4, 2011 Yknow if lowering the Windows volume is do damn buggy, why not just lower the volume of the notes that are played? ReMooD (when it had music that is) did this. 0 Share this post Link to post
tempun Posted August 4, 2011 GhostlyDeath said:Yknow if lowering the Windows volume is do damn buggy, why not just lower the volume of the notes that are played? ReMooD (when it had music that is) did this. This same workaround was used by natt in prboom+. 0 Share this post Link to post
natt Posted August 4, 2011 SDL_Mixer midi playback on Linux (OSS) doesn't have functioning master volume control either. Here's their implementation: native_midi_gpl/native_midi_gpl.cvoid native_midi_setvolume(int volume) { } 0 Share this post Link to post
entryway Posted August 4, 2011 natt said:SDL_Mixer midi playback on Linux (OSS) doesn't have functioning master volume control either. SDL_Mixer/native_midi_win32.c is written by author of prboom :) native_midi_win32.c/* native_midi: Hardware Midi support for the SDL_mixer library Copyright (C) 2000,2001 Florian 'Proff' Schulze */ #include "SDL_config.h" /* everything below is currently one very big bad hack ;) Proff */ 0 Share this post Link to post
Hellektronic Posted October 13, 2023 This is an ancient thread, but I'd like to offer a solution for anyone getting this issue with Chocolate Doom, as Microsoft GS Wavetable Synth is a pretty good general midi option, and Chocolate Doom is a pretty great port. I was really troubled by this bug, so: Go into sound settings (right click the speaker in the task bar), go into sound control panel, playback, double click your default audio device, go to advanced tab, then disable "Allow applications to take exclusive control of this device", and apply. This seems to have fixed the bug with native MIDI for me, sound and music can now be turned up or down separately. If this doesn't work, try installing and uninstalling Virtual MIDI Synth by Coolsoft, which overwrites your MIDI player. This is probably unrelated and just a coincidence that occured while troubleshooting, but I'll put it here just in case, as a note. 0 Share this post Link to post
rfomin Posted October 13, 2023 3 hours ago, Hellektronic said: This is an ancient thread, but I'd like to offer a solution for anyone getting this issue with Chocolate Doom, as Microsoft GS Wavetable Synth is a pretty good general midi option, and Chocolate Doom is a pretty great port. This problem has been fixed since Chocolate Doom 3.0 (2017, with midiproc). It has also been fixed for a long time in PrBoom+, Crispy Doom and others. 0 Share this post Link to post