|
Please tell me if I have this right in regards to a 44.1khz sound wave.
I know the value written to the 11bit wavelength is a count-down timer clocked by the cpu cycle, and that it needs to clock 16 times before the wave is 'done'. Depending on the duty cycle, only part of this wave is actully high.
If a game writes 1152 to the 11bit wavelength, with a duty cycle of 2/14, then I would write "1"s to a sound buffer until (1152 * 16) / 7 cpu cycles had passed, and then write "0"s from then on? That would be 2633 cpu cycles, or about 1.47 ms, which is approximately 65 "1s" written compared to 455 "0s" written. This doesn't seem right, so could someone help me out? Thanks.
|