Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Development » Audio crackle, WASAPI
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Audio crackle, WASAPI [message #4260] Mon, 21 December 2015 05:36 Go to next message
derpyqueue  [PM]
EDIT 2: Well, played Crash Bandicoot 3 and it reminded me that there really is audio crackle that I can't seem to get rid of, at all. It crackles at certain times like when you warp into a stage through the lightning ball. Setting 10000 period time and 150ms buffer doesn't help. Is that intentional? There's also some mild issues during the BIOS intro after the Playstation (second) logo - there's echoing and crackling. Again, can't get rid of this at all.

EDIT: Turns out period time was too low. I needed somewhere between 800-850 to eliminate the crackle.

I was playing Legend of Legaia and I noticed a sharp audio crackle every minute or so. I feel like this didn't use to happen, though it's been a very long time since I last played something on Mednafen. I used to have Sound Buffer at 12, which I remember was the level at which I got rid of any continuous crackle, but I seem not to be able to eliminate this momentary crackle even at Sound Buffer 100, and the thing is that the audio is perfect other than that one little hitch every minute.

I'm using WASAPI exclusive, 44100kHz (native PSX rate), and the ISO is being loaded to RAM to eliminate disk load, though the drive is an SSD. Drivers are up to date, and my Windows 8.1 x64 install is just a few weeks old. My system has been stability tested ad nauseam, and there are otherwise no signs of faulty hardware. CPU is a 4.3GHz i5. There's no throttling or power saving options enabled, and internet is disabled during gameplay.

For comparison, I have WASAPI set to a 10ms buffer on PCSX2, 8ms on Gambatte, and ASIO set to 6ms on MAME, so setting 100ms on Mednafen and still getting audio bugs is utterly perplexing to me. Is this a case where I simply won't ever get perfect audio? Is there something in the settings I could try? Is this a bug with Mednafen perhaps?

More info: Resampling quality is set to 10, but 0 made no difference. I haven't changed sound period time from 500 because I don't know what it does. I've tried sample rate of 48kHz which made no difference.

[Updated on: Mon, 21 December 2015 11:46]

Re: Audio crackle, WASAPI [message #4261 is a reply to message #4260 ] Tue, 22 December 2015 04:01 Go to previous messageGo to next message
Administrator  [PM]
The sound.period_time setting's default is 0(default/auto), not 500. Did you change it and forget?

As for persistent crackling, you could pass "-soundrecord filename.wav" to Mednafen and examine the recorded sound file to differentiate between crackling caused by emulation or the game, and crackling caused by the sound output code or external factors.

[Updated on: Tue, 22 December 2015 04:02]

Re: Audio crackle, WASAPI [message #4262 is a reply to message #4261 ] Tue, 22 December 2015 05:57 Go to previous messageGo to next message
derpyqueue  [PM]
I did change it, but it only occurred to me to play around with it after I'd already tried other options. I'll try the recording once I get back home, thanks.
Re: Audio crackle, WASAPI [message #4265 is a reply to message #4261 ] Tue, 29 December 2015 23:55 Go to previous messageGo to next message
derpyqueue  [PM]
I forgot to ask, how does period time actually affect overall latency? If I have 1000 period time and 18 buffer size for example, is the total latency just 19ms?
Re: Audio crackle, WASAPI [message #4266 is a reply to message #4265 ] Wed, 30 December 2015 03:47 Go to previous message
Administrator  [PM]
More or less, though the period time you specified may have to be rounded internally at some point(such as to a whole number of samples, or a number of samples that's a power of 2).

At least in the WASAPI exclusive mode case, Mednafen should print out the amount of buffering latency on startup. There may still be some additional latency after that, due to any resampling/oversampling the sound card or DAC does, but that's probably <1ms extra.

[Updated on: Wed, 30 December 2015 03:49]

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:SNES core Higan update v80 smc compatible
Next Topic:Compiling Mednafen 0.9.22-WIP fails with PSX enabled on Intel Mac OS X 10.5.8 [SOLVED]
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 18 11:52:49 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software