(This issue exists afaik since the initial implementation of the audio-core and is known to many people. However no one bothered to open an issue on this, so I decided to do it for the sake of documentation.)
Luigis Mansion 2 is only playing a loud noise as audio output. This happens at any position in the game.
To better understand what I mean, here is a YouTube video where you can instantly hear the sound issues I described: https://youtu.be/6VXTSKo2dhA?t=12m40s
I don't know if it's just an illusion but when listening long enough, I'm able to hear the extremly quiet game sound under the noise. (The best example of this is 12:40 in the mentioned video)
I logged some of the values in audio_core and noticed something interesting: The Amazing Spiderman and Luigis Mansion use a buffer size of 896 here, while all other games I tested used a size of 14336. Isn't it strange that the two games with broken sound use a size different from the size working games use?
@MerryMage @wwylele (Tagging you because it could be important)
EDIT: We found another game with broken sound which is using that buffer size: Metroid Prime Federation Force
After doing some further research on this. It seems very likely to me that those games use G.726 instead of G.711.
Wikipedia says on this: Where circuit costs are high and loss of voice quality is acceptable, it sometimes makes sense to compress the voice signal even further. An ADPCM algorithm is used to map a series of 8 bit 碌-law (or a-law) PCM samples into a series of 4 bit ADPCM samples. In this way, the capacity of the line is doubled. The technique is detailed in the G.726 standard.
Remeber that Luigis Mansions buffer size is 896 whereas it is 14336 for all the other working games? It is 16 times smaller than the one for games with working sound. And what's also 16 times smaller? The number of possible values for an 4 bit value, compared to an 8 bit one.
not sure what you鈥檙e suggesting. we already support both pcm8 and nintendo鈥檚 version of adpcm
it would be possible that Luigi鈥檚 mansion uses something like ima adpcm instead but that鈥檚 kinda a wild guess.
Most helpful comment
I logged some of the values in audio_core and noticed something interesting: The Amazing Spiderman and Luigis Mansion use a buffer size of 896 here, while all other games I tested used a size of 14336. Isn't it strange that the two games with broken sound use a size different from the size working games use?
@MerryMage @wwylele (Tagging you because it could be important)
EDIT: We found another game with broken sound which is using that buffer size: Metroid Prime Federation Force