libretro / desmume2015

Port of Desmume to libretro based on Desmume SVN circa 2015.
30 stars 44 forks source link

Crackly audio in Zelda Phantom Hourglass compared to Desmume standalone #81

Open jeremynsl opened 8 years ago

jeremynsl commented 8 years ago

There are some severe audio crackling problems using latest Retroarch stable /w latest updated Desmume core. I've tested on Desmume standalone v5548 and the sound is much cleaner. Tested using Windows 7. No interpolation used in standalone. I tried to keep the other settings extremely close, like bus timing on, both on JIT recompiler w/ block size 12.

I've recorded two short sequences where this is very easy to hear, near the beginning of the game. I've also tested the game on my physical DS and it is nowhere near as noisy as the RA core, sounds very close to the standalone.

Retroarch Standalone

inactive123 commented 8 years ago

"Crackly audio" means almost nothing. What is more likely going on is that your framerate is running below fullspeed, and since RetroArch core has no frameskipping auto turned on by default, you'd experience audio crackling since it is still trying to run with all frames being rendered instead of skipping 1 or more of them.

Anyway, hard to tell given the brief detail you've given us so far.

jeremynsl commented 8 years ago

Hey thanks for the reply. I am running a i5 3570k @ 4.1ghz. My framerate in both standalone and RA versions is locked at 60fps and CPU usage is quite low in both. I'm using vsync. I very much do not think it's a performance-related problem.

If you want more detail can provide it, just let me know what.

hizzlekizzle commented 8 years ago

Do you have audio sync enabled? If so, try turning it off. You also might try increasing the max timing skew.

inactive123 commented 8 years ago

Maybe he means that I just took out the audio interpolation which was rather inefficient and which the original DS wouldn't have.

Not sure if that's what he is referring to. Anyway, it was leading to all sorts of issues that were bad and I saw no point to doing it in such an inefficient way. If we ever do audio interpolation, it should be done a lot more efficiently than that.

andres-asm commented 8 years ago

Disable hard gpu sync. Hard GPU sync requires frame times lower than 16ms.

jeremynsl commented 8 years ago

@twinaphex As I mentioned audio interpolation was turned OFF in standalone.

Audio sync is ON, as is setup by default in RA. I will try messing with that, timing skew and GPU sync and see if any of those improves the issue.

ghost commented 8 years ago

I have issues with the audio in this core as well. It's not really crackling as if my frames are dropping but it just sounds 'wobbly?' I guess? I don't know how to describe it.

RetroArch Standalone

jeremynsl commented 8 years ago

@hizzlekizzle @fr500 I have enabled/disabled GPU Hard Sync, Audio Sync, Vysnc and raised Audio Skew to max. The audio always sounds the same. @Axiphel that sounds very similar to my issue.

One more bit of info, I'm running AMD R9 290 w/ latest drivers.

Ryunam commented 7 years ago

I can confirm I'm experiencing the same audio output fromthe Retroarch Desmume core, as opposed to the standalone version of the emulator. To be more specific, it sounds as though the treble has a grating, distorted sound to it. I'll try to post some comparisons , but my experience is definitely comparable to Axiphel's recordings.

EDIT: I may stand corrected though. It seems indeed more accurate with respect to the actual DS / DSi hardware.

jeremynsl commented 7 years ago

Just FYI as a reminder I have access to a gen1 DS and can record the exact same sequence as I did above on it. To my ears, it does not sound nearly as crackly as the libretro core. If that would be helpful let me know and I'll capture the raw sound from my DS and post it.

EasyDeee commented 7 years ago

Been having the same/similar issues in Castlevania Dawn of Sorrow, particularly the starting area with the bell sample and the audio artifacts are essentially identical to the Dragon Quest example posted above.

Not that the bell sample sounded particularly hot on OG hardware (especially not with those terrible speakers) but like the poster directly above me, I don't remember it being this notable when using headphones (I've played the game more than I care to admit). Apart from that, using the desmume core in RA is as close to perfect you can get, it looks so incredibly smooth in motion, runs great too, so kudos for that.

jeremynsl commented 7 years ago

Curious if there is anything else I can test to help correct this issue? As I mentioned, I also have access to an original DS I could record.

MarkBuechler commented 7 years ago

I'm having the same issue. If I disable audio, video/gameplay is smooth. If I have audio enabled, both DS games I tried (Pokemon black and white) run at about 1/4 speed with the audio crackly/pausing constantly. Retroarch is taking <30% of one core and I'm using an NVidia 1050ti with v375 drivers on kernel 4.10. I've also tried on other kernel versions (as old as 2.6.35) with the same result. I've also compiled with different version of gcc/g++ (4.5, 4.8 and 5.1) - no difference. For sound, I'm using straight alsa -> nvidia HDMI with no mixing or anything - just a basic asound.conf.

Tatsuya79 commented 6 years ago

I have a revert to the old SPU here + an input lag reduction fix (current master doesn't need it, it's just an issue with the old code) if some would prefer that. That's if you don't need the recent features like resolution upscaling or hybrid view. I can compile it fine on windows, no guarantee about other platforms.

jeremynsl commented 5 years ago

I'm happy to report this seems to be solved with the latest 'Desmume' core on Retroarch 1.7.6 Win64.

kamikazilucas commented 2 years ago

still a problem for me on desume 9.13

Anhrak commented 2 years ago

I've got these same issues. The sound becomes distorted every 10-ish seconds any time you're inside a building, cave or dungeon. The sound distorts in a quality unlike performance delay, and even happens when you're literally doing nothing at all while at consistent intervals.