-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Regression] Random chance of Audio cracking when "Advanced SPU Logic" is on. #589
Comments
We also have someone saying savestates are no longer reliable for some reason due to the SPU, I can't remember the details right now. maybe related. |
DeSmuME.webm I also tested this on my laptop which has completely different hardware, and windows 11 instead of 10, and the same thing happens. So I dont think its my hardware. |
"Enable advanced bus-level timing" was off, I turned it on and this seems to have solved the issue. |
not good enough for me |
I've had this mentioned to me, as well. Even after attempting to track it down, and all the changes in the SPU re-write branch, it still happens; all I managed to do was reduce how often it happens, which seems to suggest it might be a synchronization issue on the host hardware. I'll see if I can track it down, anyway. |
this type of stuff is expected to happen in the case of "dual spu", although not in the case of looping samples but rather samples being cut to steal voices in complex sequences, or possibly in streams. It's because the spu and the cpu do run asynchronously with chaotic timing and sometimes the cpu cuts things early. @yontekh can you post a savestate (on latest git version) or save file as close as possible to that cave music? the cave music is actually quite good for debugging this, I would think. |
I've replicated the problem with the BIOS startup sound. The issue is that the BIOS (and some games) are really terribly synchronized to the audio hardware, and when they're processing captured data, they write far too close to the data that is actually being played back. Because we aren't able to get perfect timings compared with real hardware, we sometimes get issues where games will cause buffer overrun (the CPU is "running too quickly"; this is why it's especially obvious with advanced bus-level timing turned off) and process data that isn't ready yet, causing clicks/pops/garbage until the next SPU update. I'll try to find a proper solution, but a quick fix was reducing the capture FIFO size to 4 samples. I'm not entirely sure why that works, though. |
Found the true culprit: When SPUFifo is being filled with the first 16 samples, it /should/ be outputting 0s (or at the very least advancing This is already fixed in the SPU re-write (I used a more straightforward FIFO implementation that avoided the issue altogether), but fixing in |
Works either way for me, do what you want |
I've created a PR for this issue (based on |
Commit ad09ed4 only partially fixed the issue. This should fix it for good.
Enforce delay for channel playback and adjust capture delay prior to FIFO buffering.
Somewhere between 0.9.9a and 0.9.11 an issue emerged where when "Advanced SPU Logic" is enabled, there is a seemingly random chance that background music will crack alot.
This only happens when Advanced SPU Logic is on. I cannot reproduce this issue on 0.9.9a. But still occurs on the latest nightly of 0.9.13.
It happens on multiple games, also in the BIOS boot sound randomly.
Here is a sample of Phantom Hourglass in the first cave:
DeSmuME_0.9.13_x64.webm
The first 2 times I am in the cave in this sample the audio is cracking for as long as you stay in the cave, when i re-enter the cave it will randomly either not crack or crack.
Also my settings:
desmume.ini.txt
The text was updated successfully, but these errors were encountered: