The International Simutrans Forum

 

Author Topic: Volume bug -> Windows XP, 102.2.2 + 128  (Read 2872 times)

0 Members and 1 Guest are viewing this topic.

alexh

  • Guest
Volume bug -> Windows XP, 102.2.2 + 128
« 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

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: Volume bug -> Windows XP, 102.2.2 + 128
« Reply #1 on: May 12, 2010, 08:47:08 AM »
Du you use the GDI or the SDL Version?

alexh

  • Guest
Re: Volume bug -> Windows XP, 102.2.2 + 128
« Reply #2 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9558
  • Languages: De,EN,JP
Re: Volume bug -> Windows XP, 102.2.2 + 128
« Reply #3 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Volume bug -> Windows XP, 102.2.2 + 128
« Reply #4 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?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Volume bug -> Windows XP, 102.2.2 + 128
« Reply #5 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.