Updated Implementing ipatix's High Quality Audio Mixer (markdown)

Kurausukun 2021-05-23 18:42:09 -04:00
parent 4f23f963ef
commit d83883f84c
1 changed files with 2 additions and 2 deletions

@ -1,7 +1,7 @@
## Preface ## Preface
All GBA games use the sound driver that comes in the GBA SDK, m4a (also known as mp2k or "Sappy"). While not a bad engine, it does have the issue of being notoriously noisy. In response to this, [ipatix](https://github.com/ipatix) created a custom audio mixer for use in the m4a engine based on the custom engine of the Golden Sun games. This engine has two major benefits: All GBA games use the sound driver that comes in the GBA SDK, m4a (also known as mp2k or "Sappy"). While not a bad engine, it does have the issue of being notoriously noisy. In response to this, [ipatix](https://github.com/ipatix) created a custom audio mixer for use in the m4a engine based on the custom engine of the Golden Sun games. This engine has two major benefits:
1. Less noise. The SDK's audio mixer mixes every channel in 8-bit before also outputting at the final 8-bit (or 9-bit) DAC. What this means is that every additional DirectSound channel will add more noise, and with enough channels it can get pretty bad. This mixer avoids that issue by mixing the audio in a 16-bit space so that the only conversion to 8-bit is at the final DAC output; this means that no matter how many channels you have, the amount of noise will be the same (equivalent to having a single channel worth of noise in the original mixer). 1. Less noise. The SDK's audio mixer mixes every channel in 8-bit before also outputting at the final 8-bit DAC. What this means is that every additional DirectSound channel will add more noise, and with enough channels it can get pretty bad. This mixer avoids that issue by mixing the audio in a 16-bit space so that the only conversion to 8-bit is at the final DAC output; this means that no matter how many channels you have, the amount of noise will be the same (equivalent to having a single channel worth of noise in the original mixer).
2. Better performance. The code is highly optimized and contains a self-modifying code loop that is loaded into RAM and allows for faster processing than the SDK mixer, even despite the new 16-bit arithmetic. For more details on how the mixer itself actually works, visit [ipatix's repository for the mixer](https://github.com/ipatix/gba-hq-mixer). However, none of this information is necessary if yo just want to use it in your game, and with that said, we can now move on to the actual tutorial. 2. Better performance. The code is highly optimized and contains a self-modifying code loop that is loaded into RAM and allows for faster processing than the SDK mixer, even despite the new 16-bit arithmetic. For more details on how the mixer itself actually works, visit [ipatix's repository for the mixer](https://github.com/ipatix/gba-hq-mixer). However, none of this information is necessary if you just want to use it in your game, and with that said, we can now move on to the actual tutorial.
## Implementing the Mixer ## Implementing the Mixer