Closed laqieer closed 3 years ago
For compressed wav data, it prvents the routine from choosing the correct branch C_channel_init_comp
and causes https://github.com/ipatix/gba-hq-mixer/issues/7
This is intentional. R5 is shifted by 31 to the left in order to set the Sign Flag which is then evaluated here: https://github.com/ipatix/gba-hq-mixer/blob/8084e0056077cc3d51229eda95aaad98be674fdf/m4a_hq_mixer.s#L166
The result of R5 is intentionally discarded and it is a common way to do this (gcc also does this) to check for single bits in a value.
Good to learn that. Thx.
https://github.com/ipatix/gba-hq-mixer/blob/8084e0056077cc3d51229eda95aaad98be674fdf/m4a_hq_mixer.s#L163 https://github.com/ipatix/gba-hq-mixer/blob/8084e0056077cc3d51229eda95aaad98be674fdf/m4a_hq_mixer.s#L164 https://github.com/ipatix/gba-hq-mixer/blob/8084e0056077cc3d51229eda95aaad98be674fdf/m4a_hq_mixer.s#L165