Page 5 of 5

Posted: 28 Feb 2007 10:07
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.

Posted: 28 Feb 2007 19:40
by Darkvater
There we go, just replace your most recent nightly openttd.exe and english.lng and you're good to go.

Posted: 28 Feb 2007 20:58
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.

Posted: 01 Mar 2007 22:12
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

Posted: 08 Mar 2007 20:22
by nycom
Both methods work fine for me.
Darkvater, will you merge your patch to the trunk ?

Thanks all.

Re: Sound very choppy in Windows Vista

Posted: 15 Aug 2007 20:42
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?

Re: Sound very choppy in Windows Vista

Posted: 16 Aug 2007 18:52
by flake
i am still using the command line workaround:
openttd.exe -s win32:bufsize=2048

Re: Sound very choppy in Windows Vista

Posted: 17 Aug 2007 13:59
by Sanada
Thanks for that reminder, flake.

I didn't recall that solution after noticing the .exe didn't work. It functions now, thanks :).

Re: Sound very choppy in Windows Vista

Posted: 19 Aug 2007 11:05
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

Re: Sound very choppy in Windows Vista

Posted: 19 Aug 2007 11:10
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.

Re: Sound very choppy in Windows Vista

Posted: 20 Aug 2007 04:36
by bugfinder
Sorry :oops:

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

Bugfinder

Re: Sound very choppy in Windows Vista

Posted: 20 Aug 2007 06:31
by spaceman-spiff
Bugfinder, I removed some of your shouting, it doesn't fit in this place

Re: Sound very choppy in Windows Vista

Posted: 20 Aug 2007 23:54
by bugfinder
Thankyou. I just don't like Vista thats all

Re: Sound very choppy in Windows Vista

Posted: 16 Mar 2008 06:25
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:

Re: Sound very choppy in Windows Vista

Posted: 30 Aug 2009 13:08
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.

Re: Sound very choppy in Windows Vista

Posted: 31 Aug 2009 11:07
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

Re: Sound very choppy in Windows Vista

Posted: 01 Sep 2009 11:50
by zaitsman
Still checking the theory, but it seems like my problem was a result of a failing hard drive.