BSNES audio static
Moderator: General Mods
BSNES audio static
I am using bsnes v0.018 on my XPS M1710, and the audio has lots of static in it. Is this due to an audio buffer underrun? How do I get rid of the static?
According to Dell specs, that's a Core Duo T2600 2.16 GHz. I find it hard to believe that the CDs are that much worse than the C2Ds.
I think it's possible that your sound card could be the problem. bsnes was really finicky with the latency settings on my sound card. I got crackling on everything above the "48 sample" setting.
I would recommend downloading the latest sound drivers from
http://support.dell.com/support/downloa ... WW1&osl=EN#
and try messing with the settings after that.
I think it's possible that your sound card could be the problem. bsnes was really finicky with the latency settings on my sound card. I got crackling on everything above the "48 sample" setting.
I would recommend downloading the latest sound drivers from
http://support.dell.com/support/downloa ... WW1&osl=EN#
and try messing with the settings after that.
Last edited by FitzRoy on Sat Jan 06, 2007 11:38 pm, edited 1 time in total.
Yes it is capable of running at a solid 60 fps.
I found a way to recreate the problem. When I load a game for the very first time, there is no static and the audio sounds good. However, after I switch bsnes into fullscreen mode, the audio stutters during the switch. Once the switch to fullscreen is complete, the audio stops stuttering, but it then it has lots of static, even though the emulation is still running at a solid 60 fps.
The reason why I think that this is a bug is because of the following:
After bsnes's audio gets full of static, even if I load a different game in windowed mode, the audio is still full of static. Reseting the game also does not fix the problem. The only way to get rid of the static is to close bsnes and run it again.
I found a way to recreate the problem. When I load a game for the very first time, there is no static and the audio sounds good. However, after I switch bsnes into fullscreen mode, the audio stutters during the switch. Once the switch to fullscreen is complete, the audio stops stuttering, but it then it has lots of static, even though the emulation is still running at a solid 60 fps.
The reason why I think that this is a bug is because of the following:
After bsnes's audio gets full of static, even if I load a different game in windowed mode, the audio is still full of static. Reseting the game also does not fix the problem. The only way to get rid of the static is to close bsnes and run it again.
Last time I ran a PGO optimized game in bsnes on a Core 1 Duo, I got ~130fps. With the recent IRQ changes, it would likely get 100fps now. The processor is more than sufficient.
Jagasian, if you have an onboard card, that's probably where the problem is. My onboard audio (AC'97) does the same thing, but my $10 SB16 PCI sounds great. I don't know why onboard chips have to suck so much. My audio code is ridiculously simple, it just sticks samples into a circular buffer, and causes the emulator to wait each time the playback position drops too far behind the current generated sample.
I'll see if I can add some latency settings in the next release for those having problems. But keep in mind, higher latency = less responsiveness to input.
Jagasian, if you have an onboard card, that's probably where the problem is. My onboard audio (AC'97) does the same thing, but my $10 SB16 PCI sounds great. I don't know why onboard chips have to suck so much. My audio code is ridiculously simple, it just sticks samples into a circular buffer, and causes the emulator to wait each time the playback position drops too far behind the current generated sample.
I'll see if I can add some latency settings in the next release for those having problems. But keep in mind, higher latency = less responsiveness to input.
Regarding the CPU(s), my version of the M1710 has a Core 2 Duo T7200 @ 2GHz.
Considering that no other application has manifested this issue and because of the symptoms described in my previous post, I am leaning towards this being either a bug in bsnes or in my laptop's audio drivers. I'll see if there is an updated driver.
Thanks for the quick replies. I'd love to get this issue resolved, as I am stickler for emulation accuracy.
Considering that no other application has manifested this issue and because of the symptoms described in my previous post, I am leaning towards this being either a bug in bsnes or in my laptop's audio drivers. I'll see if there is an updated driver.
Thanks for the quick replies. I'd love to get this issue resolved, as I am stickler for emulation accuracy.
My system uses a built in SigmaTel High Definition Audio device, and it is using the latest drivers. I'm not an audio buff, but that sounds like a generic built in chipset.
I am using the lowest audio latency setting in Nestopia, with no problems. Also, why would the audio get full of static only when switching into fullscreen mode? Why would the static not go away when switched back into windowed mode, even if a different game is loaded?
Maybe when switching between window and fullscreen modes, bsnes could pause emulation, so that the audio could also be temporarily stopped. It might be a simple workaround for crappy audio systems?
I am using the lowest audio latency setting in Nestopia, with no problems. Also, why would the audio get full of static only when switching into fullscreen mode? Why would the static not go away when switched back into windowed mode, even if a different game is loaded?
Maybe when switching between window and fullscreen modes, bsnes could pause emulation, so that the audio could also be temporarily stopped. It might be a simple workaround for crappy audio systems?
Trust me, I used to think the same thing, because bsnes was the only program that needed my sound card's lowest setting. But like byuu said, when there is an input for the program to worry about, you have to choose between sound latency and input latency. It sounds like byuu didn't want to make the same compromise as other authors. There used to be a special build of bsnes with this opposing buffering technique (i think it was .017 by kode54). It's not worth digging up because of the accuracy improvements since then, but it was more compatible with people sound cards.Jagasian wrote: Considering that no other application has manifested this issue and because of the symptoms described in my previous post, I am leaning towards this being either a bug in bsnes or in my laptop's audio drivers. I'll see if there is an updated driver.
I think a config file option would be a good idea, and I'm not entirely opposed to an audio section either. I just wouldn't want it getting filled with useless stuff to kill off aesthetically unpleasant empty space.
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
That's perfectly normal.Jagasian wrote:I just tried the experimental version of bsnes version .19, and I enabled audio logging. The interesting thing is that the static doesn't occur in the generated WAV file.
Errors you hear due to bad sound cards in conjunction with a program running, or bad audio interface in a program won't affect perfectly normal sample perfect WAV files which will sound fine playing back in any audio player fully compatible with your setup.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
As always, if anyone believes the problem is with bsnes' audio subsystem, the code is open source. If anyone offers improvements, I'll add them in. If anyone wants to go out of their way and write a completely new audio driver, I can use that, too. It's very easy to derive from the "Audio" class in src/ui, you need only support ~3 functions to get sound working. I added this class just so that I could add in audio drivers people write in the future with ease, since I wasn't able to add Nach/Bisqwit's last Linux driver.
In the mean time, I've done the best I personally could.
I tried adding kode54's event handler code to DirectSound, and it caused a decent speed hit and crackling on my sound card. If I recall the discussion, most people had reported even more problems with that change, and we decided not to go with it in the end. I can always add that back if people think it will help.
I don't know why the sound breaks up going from fullscreen to windowed mode, logging events looking for problems reveals nothing. I'm not a perfect programmer and have things I need help with to fix.
The only thing I'm substantially good at is improving SNES CPU and PPU emulation in general.
What I really need is a high end audio driver that does automatic resampling in the background, so that I can run the video at a perfect 60hz and audio that automatically resamples to fit the current playback frequency. The audio would sound an infinitesimal bit worse with the resampling, but I think most wouldn't notice with a good enough resampling algorithm. It would be far less noticeable than the lost video frames/tearing I have now. But I'm nowhere near qualified to make such a driver.
In the mean time, I've done the best I personally could.
I tried adding kode54's event handler code to DirectSound, and it caused a decent speed hit and crackling on my sound card. If I recall the discussion, most people had reported even more problems with that change, and we decided not to go with it in the end. I can always add that back if people think it will help.
I don't know why the sound breaks up going from fullscreen to windowed mode, logging events looking for problems reveals nothing. I'm not a perfect programmer and have things I need help with to fix.
The only thing I'm substantially good at is improving SNES CPU and PPU emulation in general.
What I really need is a high end audio driver that does automatic resampling in the background, so that I can run the video at a perfect 60hz and audio that automatically resamples to fit the current playback frequency. The audio would sound an infinitesimal bit worse with the resampling, but I think most wouldn't notice with a good enough resampling algorithm. It would be far less noticeable than the lost video frames/tearing I have now. But I'm nowhere near qualified to make such a driver.
You know, you're right. There were more bug reports from that in a few weeks than we have with the current one in a year. You know that latency slider in nestopia? Would something like have any chance of fixing jagasian's problem as a config file option?byuu wrote: I tried adding kode54's event handler code to DirectSound, and it caused a decent speed hit and crackling on my sound card. If I recall the discussion, most people had reported even more problems with that change, and we decided not to go with it in the end. I can always add that back if people think it will help.
On my current system, I am running Nestopia with the lowest latency setting via the slider. However, on other systems I have experienced the same kind of static that I am getting with bsnes and increasing the latency does fix the problem.FitzRoy wrote:You know, you're right. There were more bug reports from that in a few weeks than we have with the current one in a year. You know that latency slider in nestopia? Would something like have any chance of fixing jagasian's problem as a config file option?byuu wrote: I tried adding kode54's event handler code to DirectSound, and it caused a decent speed hit and crackling on my sound card. If I recall the discussion, most people had reported even more problems with that change, and we decided not to go with it in the end. I can always add that back if people think it will help.
However, I don't think that bsnes should cater to buggy PC hardware if that takes development time from improving the accuracy of the core emulation.
Byuu wanted a very high-quality resampler,so here's one that does a damn good job.
Check it out:
http://www.lcscanada.com/audiomove/
The highest-quality resampling engine you'll ever find (comparable to the high-end commercial [pro] apps).Uses libsamplerate as its resampling engine (open-source)
About sound latency, 20ms (4 buffers x 240 samples at 48kHz,DirectSound) will work fine with >80% of the soundcards.
Others may need twice the latency,while some will sound great even with 10ms,so having a sound latency setting is a very good idea.
P.S. If you ever add sound resampling to bsnes,please add a preference in the .ini to turn this off,in case somebody has a pro soundcard or an X-Fi.
Check it out:
http://www.lcscanada.com/audiomove/
The highest-quality resampling engine you'll ever find (comparable to the high-end commercial [pro] apps).Uses libsamplerate as its resampling engine (open-source)
About sound latency, 20ms (4 buffers x 240 samples at 48kHz,DirectSound) will work fine with >80% of the soundcards.
Others may need twice the latency,while some will sound great even with 10ms,so having a sound latency setting is a very good idea.
P.S. If you ever add sound resampling to bsnes,please add a preference in the .ini to turn this off,in case somebody has a pro soundcard or an X-Fi.
Last edited by kick on Mon Jan 08, 2007 7:48 am, edited 4 times in total.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
LOL,X-Fi platinum is not a pro card,it's just a high-end consumer card.
Something like the X-Fi Elite Pro can be considered pretty accurate,although you can get a much better pro card for that money.
Something like the X-Fi Elite Pro can be considered pretty accurate,although you can get a much better pro card for that money.
Last edited by kick on Thu Jan 11, 2007 11:00 pm, edited 2 times in total.
it only took them till after RTM to realise that.Clements wrote:Clarification: EAX is hardware-accelerated with OpenAL under Vista, but not DirectSound. Apparently Creative are putting out X-Fi drivers that can wrap legacy EAX calls to OpenAL EAX to remedy the issue.
Does [Kevin] Smith masturbate with steel wool too?
- Yes, but don’t change the subject.
- Yes, but don’t change the subject.
...although an Audigy2 with the right drivers (kX Project) can sound exceptionally good.Still prefer this combination over an X-Fi with bug-ridden drivers.funkyass wrote:Anything soundblaster shouldn't be considered for sound accuracy for anything.
Creative drivers have always been a piece of shit.
The SoundStorm was pretty impressive for an onboard audio solution.Not bad at all when using the digital out,despite having only a 16-bit output.
Last edited by kick on Sun Jan 14, 2007 5:38 pm, edited 1 time in total.
an X-fi in audio creation mode outputs 1:1 sound giving you great sound quality and making it a pro card, the only difference between the platinum and the elite pro is the dac, the elite pro has a 8db higher S/N ratio on the dacs.
The rest is identical
EAX is only enabled in game mode and optionally enabable in entertainment mode, besides that, the card is THX certified
The rest is identical
EAX is only enabled in game mode and optionally enabable in entertainment mode, besides that, the card is THX certified
tetsuo55 wrote:an X-fi in audio creation mode outputs 1:1 sound giving you great sound quality and making it a pro card, the only difference between the platinum and the elite pro is the dac, the elite pro has a 8db higher S/N ratio on the dacs.
The rest is identical
EAX is only enabled in game mode and optionally enabable in entertainment mode, besides that, the card is THX certified
8db of noise is alot. Big difference when using large speakers and high quality amplifiers. [/audiophile]
everything i say is a lie
the above line is true
the above line is true