I did implement the "& 31" change, and that did significantly speed it up (output tone increased to ~2400 Hz, which is an order of magnitude increase and the // operation was indeed the main speed killer). I still have that on the back burner as a fallback if I can't get anything faster.
At this point I'm trying to figure out if it's possible to implement multiple "decent" audio tones up to 10kHz on a 16Fxx architecture with a 20Mhz OSC. I've even considered compromising with a "less clean" sin approximation, such as a simple polynomial for the quarter wave (ex: =x*22/14-47/21249*x^2-7*x^3/(2^16) with x in binary radians has an error of about 1.7%, assuming I can implement it without being killed time-wise with DIV32).
Thanks,
Dave
Bookmarks