Sound very choppy in Windows Vista

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

I have the finished the driver on my desktop for a few days now, the diff is essentially the same as above; there is just single problem left. The reason I have not committed it and it's not in 0.5.
When lots of sounds are played at the same time you can hear clicks distinctly in the audio. To me it looks like the code is correct so I have no idea what the problem might be. HMage was so friendly to try and solve the problem for me, or at least find the cause and found that most likely DirectSound itself is at fault; its resampling of the audio (from source 8bit 1-channel to 16bit 2-channel) introduces these clicks. We have tried various possible fixes, workarounds, but none helped. That's why it's not in SVN.

I will make a binary and post the latest diff this afternoon in this thread so people with more experience can look into it and check whether DirectXAudio in Vista is any better, or my actual code is faulty.

The only possible solution I haven't done yet is resamaple the audio ourselves to DirectSound output format. But in that case we can just as well stick to the winmm driver.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

There we go, just replace your most recent nightly openttd.exe and english.lng and you're good to go.
Attachments
openttd-dsound-win32-r8946.zip
windows binary, doesn't work in win9x
(739 KiB) Downloaded 222 times
dsound_v5.diff
Diff file for the techies
(30.02 KiB) Downloaded 268 times
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
HMage
Engineer
Engineer
Posts: 4
Joined: 16 Nov 2006 15:05
Contact:

Post by HMage »

Steps to test:

1. Download r8946 and unpack into OpenTTD folder.

2. Download the exe that Darkvater had posted in previous post and unpack the .exe file into OpenTTD folder.

3. Download the savegame file attached here and place it into 'save' subfolder inside OpenTTD.

4. Launch the exe.

5. Load the savegame 'Hell'. It should load in pause mode, stopping music will help hearing any possible problems.

6. Unpause.

If you hear clicks like in this mp3 (452kB), then you've encountered the same problem I did.

Please log the result, OS (Windows version) and what audio interface (sound card) you were using.
Attachments
hell.sav
Audio-busy savegame, long (by duration) samples are triggered quite often.
(88.8 KiB) Downloaded 221 times
- Eugene 'HMage' Bujak.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Post by Michi_cc »

Works for me. I don't notice any clicks. No difference with or without the explicit primary buffer play call.

Self-compiled exe, Windows XP x64, 64-bit OpenTTD.
Soundcard: Creative Audigy 2 ZS.


-- Michael Lutz
nycom
Engineer
Engineer
Posts: 62
Joined: 14 Nov 2005 13:14
Location: Paris, France

Post by nycom »

Both methods work fine for me.
Darkvater, will you merge your patch to the trunk ?

Thanks all.
Sanada
Engineer
Engineer
Posts: 2
Joined: 15 Aug 2007 20:32

Re: Sound very choppy in Windows Vista

Post by Sanada »

Sorry for digging up an old thread, but I can't get it work.

I get the choppy sounds too, but after replacing the .exe and the language files I get an error saying my openttd.grf is corrupted or missing. It worked before though (although the sound stuttered).

I tried the latest 0.5.3. version, but it gave me trouble still.

Perhaps I'm using shabby source files on installing? Can anyone help?
User avatar
flake
Engineer
Engineer
Posts: 66
Joined: 28 Apr 2004 10:07
Location: Salzburg
Contact:

Re: Sound very choppy in Windows Vista

Post by flake »

i am still using the command line workaround:
openttd.exe -s win32:bufsize=2048
*<(:-}
Sanada
Engineer
Engineer
Posts: 2
Joined: 15 Aug 2007 20:32

Re: Sound very choppy in Windows Vista

Post by Sanada »

Thanks for that reminder, flake.

I didn't recall that solution after noticing the .exe didn't work. It functions now, thanks :).
User avatar
bugfinder
Traffic Manager
Traffic Manager
Posts: 245
Joined: 01 Jan 2006 05:49

Re: Sound very choppy in Windows Vista

Post by bugfinder »

I absolutely hate Vista. The only good thing about is that it looks nice. Thats about it.
Vista stops so many good programs from running because of "Compatibility Issues"
Take my instance for example. Many games wouldn't run, my remote control wouldnt work, the control menu for my remote wouldnt function properly, half of my songs wouldn't play,
I seriously hate Vista. It is annoying with it's stupid update pop-ups whic come up every 5 minutes because microsoft found a " New and exciting" .grf for it's icons. And my anti-spyware programs could only throw out half the spy-ishing net.

C'mon. Get a good version of Windows XP Professional or at least Home edition xp and your problems will be a thing of the past. And vista should too.

Bugfinder
Last edited by spaceman-spiff on 20 Aug 2007 06:30, edited 1 time in total.
Reason: Removed bold text and smilies
Tom0004
Chairman
Chairman
Posts: 822
Joined: 01 Jul 2007 22:33
Location: Manchester, UK

Re: Sound very choppy in Windows Vista

Post by Tom0004 »

please read the forum rules !!
h. Members are expected to post in a way which is consistent with "normal writing". Members should not post excessive numbers of emoticons, large, small or coloured text, etc. Similarly users should not SHOUT or use excessive punctuation (e.g. ! and ?) in topic titles or posts. Members who violate this rule excessively will be warned.
User avatar
bugfinder
Traffic Manager
Traffic Manager
Posts: 245
Joined: 01 Jan 2006 05:49

Re: Sound very choppy in Windows Vista

Post by bugfinder »

Sorry :oops:

Yeah, seriously though Vista does restrict a lot of programs
Thats kinda why I dont use it.

Bugfinder
User avatar
spaceman-spiff
Retired Moderator
Retired Moderator
Posts: 20634
Joined: 28 Jul 2002 07:08
Location: Belgium
Contact:

Re: Sound very choppy in Windows Vista

Post by spaceman-spiff »

Bugfinder, I removed some of your shouting, it doesn't fit in this place
Well, back to work, lot's of it in the near future
User avatar
bugfinder
Traffic Manager
Traffic Manager
Posts: 245
Joined: 01 Jan 2006 05:49

Re: Sound very choppy in Windows Vista

Post by bugfinder »

Thankyou. I just don't like Vista thats all
User avatar
That Guy
Engineer
Engineer
Posts: 55
Joined: 23 Aug 2005 03:16
Location: Vancouver, BC, Canada

Re: Sound very choppy in Windows Vista

Post by That Guy »

The development of everything has snags, in the development of an OS you should almost expect them. Yes I'm aware Vista is passed its development, but you try trouble shooting the dam thing. Just look at the trouble this community goes too just to fix bugs in OpenTTD, Trust me OpenTTD is complex but an OS! Hell :shock: ! Yes there are compatibility issues in Vista, but XP was filled with horrible tidbits of code that made it quite unreliable in its early days. and en even bigger point, Vista doesn't run XP gen programs very well because they're development was tweaked on XP for XP. Microsoft does things that are what you could call "sketchy" at times but Vista is serious Bis. the best advice i can offer is don't buy a new OS if your only going to complain that its not the same as the one you had before.

lol

sorry got in a bit of a rant there :roll:

anyway on the subject of buffers, lol, i've changed my code to -s win32:bufsize=1536 and it seems smoother. maybe its just me lol. :lol:
zaitsman
Engineer
Engineer
Posts: 2
Joined: 30 Aug 2009 13:02

Re: Sound very choppy in Windows Vista

Post by zaitsman »

I have been playing OpenTTD 0.4.0.1 for months under Vista and never experienced any sound-related bugs. However today I noticed that as long as i play for 10-15 minutes, the sound effects disappear! I first blamed it on uptime(Vista is not as good as Xp, so after I keep it for 2-3 weeks I have to restart it (sigh)), but the restart didn't help - so I thought that perhaps it was time to upgrade my OpenTTD, i dl'ed and installed a 0.7.2 version - the same luck. I then thought it was my saved game - well, the sound doesn't seem to disappear in scenario editor, but i then found this thread and dl'ed a 'hell.sav' - the sound disappears there, too. Whenever i try to add bufsize to the command prompt, the game won't load so i can't really try it - it displays a huge window filled with list of options. if i only specify the sound driver and omit the bufsize - it's ok, i thus think it has something to do with the way the parameter should be specified.
Please not that while the sound disappears completely, the midi music keeps on playing.

Upd well i managed to apply the bufsize, and now it takes a little long for the sound to disappear, but it still does it.
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Sound very choppy in Windows Vista

Post by Auge »

Hello

I can confirm the chopping sounds for (more or less) up to date nightlies (tested: 17030, 17190 and 17274) too. I use the Linux Generic Binary i686 32Bit, running on Ubuntu 9.04. And, as zaitsman said, the music is still playing without any chops.

Are any additionally informations needed?

Tschö, Auge
zaitsman
Engineer
Engineer
Posts: 2
Joined: 30 Aug 2009 13:02

Re: Sound very choppy in Windows Vista

Post by zaitsman »

Still checking the theory, but it seems like my problem was a result of a failing hard drive.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 6 guests