I use a simple PlaySound() command when changing from certain rooms (the sound of a door opening)
And it seems that on my laptop the sound stutters and plays twice. Im fairly sure it didnt do it on my desktop but i have a sound blaster audigy in that.. Is this a problem for cards with smaller buffers? I.e onboard stuff.. and if so how can i fix it?
Hmmm. Did you play the sound and change the room immediately afterwards?
It may be because of the loading of the new room that causes the stuttering in slower systems.
Try to Wait() for a few frames after playing the sound and see if that fixes anything in the laptop.
What format are your sounds effects saved in? OGG files seem to produce less stuttering than MP3 files in my experience. Also, you can try to increase the amount of memory available for the game under Advanced Settings in winsetup.exe.
Yes the sound file is played immediately before room change.
Using Wait() does help but only if i wait for the entire sound file to be played.. and since its about a second and a half i'd rather not delay the player to that extent.
My files are all in OGG format since i favour an open format if possible and i think the memory allowance is only for the sprite cache isnt it? so it shouldnt really help but i'll give it a go.
From a processor perspective there is no reason why it shouldnt handle it. Its a 2.4ghz core 2 duo laptop which is actually the same as the desktop. The only thing that i think may cause problems is the onboard sound chip.
Actually apart from sound card latency, there're several things that may (i.e. I'm not sure of it) affect the performance, like access speed of the harddrive and the graphic card (right, since during room changes the whole screen is redrawn and we all know that laptops often come with limited onboard chips; you may also try setting up your game for DX5 if it's currently using D3D9 or vice versa and see if that makes a difference).
Graphics card is an Nvidia 6800. I very much doubt thats the cause.. and the game is already running in Dx5 due to the snow/rain plugin.
Harddrive access time is a possibility. Is there any way to cache sound files in advanced? Since this sound file is use very often it would be a good candidate for caching.
This is most likely due to the room not loading quickly enough to update the sound card buffer, what resolution are your rooms?
320x200
Hmm, that shouldn't cause a problem. Which screen transition are you using?
FadeOutFadeIn
Ok thanks, I'll see if I can reproduce any problems with this.
Sorry for bringing up this old thread, but I'm getting sound stutters at 640x400 with the same problem. And this on a quad core q8200 with a gtx 275 :(
It's still a problem as far as I'm aware.
I'm convinced its an issue with the way AGS deals with sound card buffers since performance of the computer seems to be irrelevant but the sound card is vital.
for example, mccarthy stutters on my 2.4ghz dual core laptop with a nvidia 6800 graphics card but doesnt stutter on a 2ghz desktop with onboard graphics with a sound blaster audigy.
The laptop out performs the desktop on everything except the sound card.
This happens to me also during room changes, but only with the DX5 driver. The Direct3D one works fine. I have an Nvidia GTX 295 video card and an Intel Core i7 920 CPU.
Seems like it could have something to do with DX5 being slower to draw graphics to the screen, while simultaneously being compounded by the process of the room loading.
Actually my game runs in DX9 by default, but I resolved the issue. I use the hardware mixer and it completely removes the problem. Interesting hey :)
Interesting. You shouldn't be getting problems like this, but if we can find a game that reliably reproduces the problem on several computers, I can investigate it and try to find a solution.
Hey CJ, do you want me to PM you a url of the game I'm working on so you can see the stutters?
If the stutters are reliably reproducable, that would be useful yes please.
McCarthy also regularly stutters (i.e every room change) on my laptop or any PC with a cheapo sound card if thats helpful
I'd have to agree with Calin on that one also, McCarthy stutters for me during room changes, where my game stutters in a room occasionally.
Me as well. McCarthy stutters during each room change on my 1.6GHz Quad Core laptop with what I imagine has onboard sound.
Hi CJ, I sent you a PM with the url but I accidently sent it as (no subject). Just thought I'd let you know.
Hi Chris just wondering if you got PM okay to test it out. I did some interesting testing actually, under the latest development version of Wine for Linux I loaded the game up and there no stutters at all. Is it something to do with DirectSound at all?
As I had to choose WaveOut for the sound to play correctly on Linux due to Wine's incompatibility. I might actually try WaveOut when I get home on my Windows machine.
EDIT: Back at home I figured out that the lower the resolution the less stuttering. For example in McCarthy if you run it at 320x200 there is no stuttering at all. Also Quest For Glory II Remake from AGD also stutters constantly. Is this a Windows 7 thing I wonder.
2ND EDIT: Well I tried my personal game on my girlfriends computer which is an AMD64 3800+/Win 7/Onboard Sound and it works fine. My PC is a Q8200 with an Auzentech Prelude X-Fi. My theory is that it could well and be how the game interacts with the drivers. I know that the X-Fi drivers aren't the best which is a damn shame.
Yes I got your PM, thanks -- I haven't had a chance to test it out yet.
It must be sound driver-related if this problem only happens on some PC's, I'll see if I can reproduce it.
Cheers, tell me if you need help testing it.
I had this problem too for "The Marionette "game(640*480- true color(dont remember good)).I have laptop 1.60 pentium IV -256 ram-64 memory graphic card.
Hi guys, i've faced the same problem before,
but it is solved now after i use .WAV sound files instead of reguler mp3 or ogg.
i don't know why .wav files worked and other format stutter.
the other files require decoding before they can be played.
PCM wavs are essentially the raw sample data so it doesnt need decoding in any real sense.
I shouldve made the door sound in mccarthy a wav... nevermind..
Realistically you could only use WAVS for small sound effects otherwise the game would be ridiculous in size.