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
Add sample rate field to AAC decoder #5195
Conversation
This fix appears to work on WMF from the MSVC CI build, so MediaNDK is the only other platform that needs to be tested. |
I leave a note here as it seems related. |
Fixes Pokémon Rumble World music as well |
Is this still WIP? |
Well I can't test the NDK implementation. I can confirm that it appears to work with FDK, FFmpeg, and WMF. |
Reviewing the code paths, it appears both the NDK and WMF backends retrieve the ADTS data and sample rate in the same way, and seeing as how WMF appear to be working fine, I'm going to call the NDK backend fine as well. If issues come up when Android is released, it can be addressed then. I would like to merge this PR. |
Fixes #4649
When AAC was added to HLE, it was entirely RE'd from how Pokemon X used it.
Rhythm Heaven Megamix uses AAC audio with a different sample rate than Pokemon, and by comparing HLE to LLE, it would appear that field 'unknown2' of the audio pipe BinaryResponse corresponds to a sample rate enum.
These sample rates were determined by adjusting the value of the 'unknown2' field and measuring how much the game sped up or slowed down compared to the base sample rate of the game's audio files.
I have also verified that this does not break the audio in Pokemon X.
This is WIP, because I have only tested this implementation with the FDK and ffmpeg decoders. I have not even tried to compile the MediaNDK or WMF implementations.
This change is