[quote:e40a4ecb2c="glena"]Yes. You should be able to play them at a different speed by adjusting the variable WP_SampleRate. When the file is opened, the header metadata is read and WP_SampleRate is set to how many samples per second to update the PWM output. It is then used to calculate the Compare1a IRQ. Change the WP_SampleRate before the following lines and it should work.
[code:1:e40a4ecb2c]''' setup compare1a reload value to match the SampleRate
WP_lx= _XTAL / WP_SampleRate ' CPU Speed / SampleRate of wave file
Compare1a = WP_lx [/code:1:e40a4ecb2c]
-Glen[/quote:e40a4ecb2c]
Thanks i will try it.
Kay
↧