Maybe the frequency calculation formula is wrong?
The frequency calculation formula should be something like that, according to GBATek :
Code:
sound_freq = -16756991 / timer
Where :
* sound_freq is the frequency of the sound
* 16756991 is half the ARM7 clock in hz
* timer is the timer value of the channel.
Then, you calculate the value the sample cursor should be incremented by at each sample as follows :
Code:
inc_value = sound_freq / mixing_freq
Where :
* inc_value is the value the sample cursor...
* sound_freq is the sound frequency in hz
* mixing_freq is the mixing frequency in hz (in the current case, 22050 or 44100)