View Full Version : Sound chopping when vsync enabled?
December 12th, 2002, 14:47
In the standard Windows port 1.3.1 (and for as long as I can remember), I've had an issue with the sound chopping up when vsync mode is enabled. This happens on both GBA,GBC, and standard black and white games, fullscreen 640x480 mode, frameskip 0, vsync on, no filter, with syncronize enabled. Priority set to Normal. Sound is at 44khz (although it does it at 22 as well).
What generally happens is the game'll load and play fine for about 15-30 seconds or so, then the sound will garble to all hell for about 1-3 seconds, then back to normal. Then repeat from beginning.
Happens in both Windows2000 and WindowsXP, DirectX 8.1, on multiple machines. Can't imagine it being a machine speed issue. I've tried it on everything from an AthlonXP 1800+ to 2000+, with anywhere from 512 to a gig of ram. No other applications open.
Tried on a Maxisound Fortissimo soundcard (it's a yahama chipset), and a standard VIA AC97 onboard sound chip. Video cards range from a Geforce2 TI64meg to a Geforce4 4200 128meg. Can't imagine it being a machine speed issue considering it does it on even black and white games. If the fastforward key is used it almost always does it as soon as the game returns to normal speed. Tried multiple other emulators in Vsync mode (even epsxe) and none had any issues at all like this..
Doesn't do it when Vsync is disabled, but I'm playing on a TV-out so Vsync is pretty essential. Dunno if it does this on the SDL version or not, I couldn't get that one to go into a 640x480 vidmode compatible with my tv-out, so didn't try it.
Here's a MP3 of what it sounds like when this happens - it's a small 32k file so don't worry about size: Castlevania 2: Belmont's Revenge audio garbling (http://www.ngphouse.com/sukijanai/cvania2.mp3)
Any constructive help besides 'Just turn off Vsync' would be appreciated. Thanks!
December 12th, 2002, 14:54
could be a timing thing.
*(OT: do you know how difficult it is to get epsxe to work with completely clean sound ? And I mean COMPLETELY - think you have that? use headphones and think again)*
what frequency is your tv running at? 60hz I assume? Maybe it helps if during play you also set your monitors display to 60hz, or use the tv as primary display.
It could also be a timing error in visual boy advance.
question: does it also happen with frameskip turned on? I wouldnt be surprised if it did.
December 12th, 2002, 15:03
Yeah, 60hz. But it's not related to the TVout.. happens identically on a machine that doesn't have a TVout whatsoever. The machine that does have the tvout is only using the TV anyway, no monitor even hooked up. But that's kinda irrelevant :) With frameskip enabled it does still happen, yes.
I borrowed a SB Live card from a friend, just got it installed a minute ago. Going to try that and see if it has the same results. Will post what happens in a few minutes, hopefully.
UPDATE: Heh it actually happened even more frequently with the SB Live card.. WindowsXP SP1 with latest drivers for everything. The test machine this time was an AthlonXP 1900+, 512 DDR, Geforce4 TI4200. Sound garbled up in exactly the same way every 5-10 seconds playing a gameboy black and white game with same settings from before.
December 12th, 2002, 21:58
Fascinating.....I've encountered the same types of symptoms on the previous version, when Vsync is enabled, although the only fullscreen mode I've tried is 800x600.
What's even more interesting is that I'm using the same soundcard as you, a Maxi Sound Fortissimo. You are refering to the first generation Fortissimo card, correct?
Anyway, I got the same occurances on my system. Now, before ya'll think it's cause of my specs, I'm running Vboy advance on a 1.5Ghz P4 with 2456MB of DDR-RAM, and a 3Dfx Voodoo3 2000 PCI.
The problem did clear up after I disabled Vsync........
As far as troubleshooting goes, try upping the priority setting to max, it should help without interfering too much with the other programs you may have running in the background...
December 13th, 2002, 01:52
Yeah, pretty sure it's the first revision. Yamaha DS1 chipset I believe. At any rate, I don't think the sound chip has much to do with the problem.. I've dupliated the problem on 5 different sound devices so far (Creative/Ensoniq AudioPCI, Creative SB Live, Via Enhanced AC97 onboard, SIS 7012 onboard, MaxiSound Fortissimo). Raising the emulator's priority, even to Highest, didn't seem to do much.
While playing around with the options noticed another issue with Vsync too.. when a filter is in use there's one line of the display near the top that doesn't sync up properly.
December 13th, 2002, 02:17
question is vsync off in your display properties?
December 13th, 2002, 03:05
Of course!! That could explain it.....
Ok, here's my theory:
You enable Vsync, so the emulator tries to run it at a FPS that's equivalent to whatever your current refresh rate is in windows, which I'm guessing happens to be above the 50 or 60 hz the game is accustomed to; presumably its running no less than 75 hz. At the same time, you have the Synchronize option enabled, which tries to get the emulator to run both the sound and Video at correct speeds relative to each other.
Well, the game's sound and video are probably designed to go at either 50 or 60 hz, and therefore either 50 or 60fps, as per the PAL or NTSC standards dictate. Would anybody care to tell us what happens when you try to run at a FPS higher than that? Choppy sound, because the sound is trying to stay in sync with the faster framerate. So, you enable Vsync, thinking that its syncing at 60 hz, when in reality it may be running at 75hz, and therefore 75fps, and thus we have the sound problems.
Wow, that made me sound like Sherlock Holmes. Elementary, my dear Mr. DrBootyX. Elementary.:D
I can't believe nobody caught this in my previous post:
I'm running Vboy advance on a 1.5Ghz P4 with 2456MB of DDR-RAM...
Ahem......We all wish we had that much RAM! :p It's actually 256mb of DDR-RAM...:D
December 13th, 2002, 03:58
Elementary.. unfortunately, incorrect. Nvidia cards in Win2000 and XP default to 60hz for directX fullscreenmodes unless a patch/tweak is applied, which I have not. The refresh and sync should both be trying to go 60fps.
To be sure I doublechecked.. changed my display to 640x480x60hz then ran VBA (the resolution didn't switch, vba instantly started in the current display mode fullscreen), same issue. Gotta be something else.
Also: Disabling Synchronize altogether and running VSynced at 60hz, while giving you the correct game speed, does not resolve the audio garbling. Happens same as always.
December 13th, 2002, 04:06
Well, I wasn't about to suggest disabling syncronize altogther.
Well, when all else fails, take a "wild shot in the dark" :D
Try switching to 16bit color (in the desktop), then running with Vsync....
December 13th, 2002, 04:44
Same. Been using 16bit color all along actually.
December 13th, 2002, 08:14
is the vsync option in the emu the same one as in nvidia's display drivers? I could imagine a "double" vsync causing problems...but it's unlikely.
December 13th, 2002, 18:53
Nvidia's display drivers only allow Vsync settings for OpenGL applications I believe. I can't find one for standard DirectX apps, or even Direct3D for that matter. Besides, can't be the case as the display is obviously not vsynched when VBA's vsync option is disabled, the tearing is clearly visible, particularly on a TV. At this point I'm leaning more toward it being a flaw in VBA's implementation of Vsync, as there's still graphic errors visible when a video filter is in use, and other applications don't have any problems vsyncing on these machines
December 13th, 2002, 19:01
vSync can be set from app like rivatuner or aTuner.
December 14th, 2002, 05:37
aTuner'll let you set Direct3D vsync sure, but not standard DirectDraw. The settings aren't shared, doublechecked to be sure, sure enough with direct3d vsync enabled it wasn't synced in directdraw.
December 27th, 2002, 16:12
i finally spend some time to test this and yup, same problem here.
seems to be a timing error of the emu
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.