-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
Possible regression with noise channel volume level #1265
Comments
Here is the commit which causes it: Here are some audio samples: This branch attempts to correct it, but I want some feedback first. It still seems way too quiet compared to just truncating to the nearest sample. |
Yeah this is definitely a regression, and it still hasn't been fixed. 😦 Looking at both kode54/mgba@ac40bb4 commit and kode54/mgba@4c9fc990, the latter is definitely better, but there are still a few issues with the patch. Some noise samples can sound a little crackly. This can be easily noticed in FRLG with the 'ksh-ksh-ksh-ksh' of exiting a room or in the beginning 'whoosh' in the Trainer battle theme. Can't get audio recording to work properly on my MacBook, so here is a recording from mGBA with the kode54/mgba@4c9fc990 patch manually applied. It didn't sync properly but the audio is fine. |
Another good way to compare using Pokemon is opening the start menu or running away from a battle. Both of those use the noise channel and sound noticeably off. I'd also really like to see this fixed, seeing as the updated core is now also being used in BizHawk, so the issue has migrated there as well. |
I've looked into this and it's unfortunately not going to be easy to fix. Pokémon FR/LG does some nasty stuff with the noise channel (it runs it at 512kiHz pretty much perpetually!) that my super-sampling approach introduced in 0.7 averages out. This decimates the range of the noise channel in the actual samples, making it very quiet. Without implementing something more robust I'm not sure how to properly fix this, and a robust fix will take a fair amount of time and effort. The old version just didn't super-sample, so it had a problem with how some other games use the noise channel, leading to weird garbage in e.g. some Pokémon cries in first and second gen. kode54's fix is, at best, a hack to prevent the range decimation, but is at least somewhat effective. |
Turns out channel 4 (and all of the GB channels) are aliased in such a way that I had been emulating but was supersampling to attempt to smooth out--this was incorrect for GBA audio, and has been disabled in GBA mode. |
As reported here:
https://hydrogenaud.io/index.php/topic,117161.0/topicseen.html
Attaching their files here for convenience.
3.0.7.ogg.gz
3.0.8.ogg.gz
3DS.ogg.gz
Another example, whether you have it now or not, the Space Pirate Mother Ship from Metroid - Zero Mission. The noise channel is quite obvious there.
35 Space Pirate Mother Ship.gba.gz
The text was updated successfully, but these errors were encountered: