The International Simutrans Forum

Development => Bug Reports => Topic started by: alexh on May 12, 2010, 05:23:28 AM

Title: Volume bug -> Windows XP, 102.2.2 + 128
Post by: alexh on May 12, 2010, 05:23:28 AM
Hey all,

been following ya'll for...going on 6 years. Anyways, I think I came across a bug.

I downloaded the newest stable version (102.2.2) the other day for Windows XP when I decided to see how the game was coming along.

I decided to turn down the volume and music after it started because IT WAS REALLY LOUD BECAUSE IT STARTS TURNED UP TO MAX ;-) (maybe start this off closer to the middle?)  Anyways, as I right as I closed the dialog box, all of a sudden I heard "click" and the whole thing got quieter by half. Everything on my computer. It took me all day to figure it out, but somehow the "Wave" volume got turned almost all the way down in the system volume controls.

I'm pretty sure it was Simutrans. Don't know what else could have done it, as I was only in the program doing anything and it's never happened before.

-Alex
Title: Re: Volume bug -> Windows XP, 102.2.2 + 128
Post by: wernieman on May 12, 2010, 08:47:08 AM
Du you use the GDI or the SDL Version?
Title: Re: Volume bug -> Windows XP, 102.2.2 + 128
Post by: alexh on May 12, 2010, 06:39:36 PM
I really don't know... I downloaded the "online installer" package and it downloaded the rest. I'd guess the SDL version, but I really don't know.
Title: Re: Volume bug -> Windows XP, 102.2.2 + 128
Post by: prissi on May 12, 2010, 07:56:58 PM
The GDI version does this on XP and win2k and maybe also on Vista, since there is only one wavesound in the MMSYSTEM, with is the only way to play sound on all windows variants out there. Even using the mixer does not help with this. Only windows 7 have this setting per program. Thank you Microsoft, it did take only 25 years to come upwith this (since MMSystem is available since windows four workgroups 3.1 ... )

SDL recalculates the loudness of the sound using their own playback routine, this it is not affected by it. In this case, use the SDL routines.
Title: Re: Volume bug -> Windows XP, 102.2.2 + 128
Post by: jamespetts on May 14, 2010, 05:37:30 PM
One thing that I find very annoying about Simutrans on Windows is that, whenever a quiet sound is played, it reduces my system volume, which remains reduced even after the sound has finished playing. I don't know whether Simutrans uses Windows 7's new way of doing this (I use Windows XP, so wouldn't be able to take advantage of this in any event), but, at minimum, would it be possible to re-set the system volume to its former level after a sound has played?
Title: Re: Volume bug -> Windows XP, 102.2.2 + 128
Post by: jamespetts on May 15, 2010, 04:07:45 PM
I looked into making a patch to fix the issue that I identified above, but found that it would not work that way: if one simply put the volume back up after calling the method to play the sound, most of the sound plays at the original, increased volume, since the sound playback is asynchronous . Anything other than asynchronous sound playback would cause hang-ups while sound is played.

The only solution, I think, is to switch to DirectSound for Windows based sound playback.