Simple and Fast audio driver for propeller - 44.1KHz 2 channel 16 bit
heres an audio driver that i wrote.
the sample rate playback is adjustable and tested up to 44100 Hz
it takes in 2 channel 16 bit unsigned PCM data
it plays back on 2 adjacent pins
this demo also requires the setup of a SD card
its based on SPIN WAV Player Ver. 1a (Plays only mono WAV at 16ksps) by Raymond Allen
- aempirei
AIM: ambient empire
the sample rate playback is adjustable and tested up to 44100 Hz
it takes in 2 channel 16 bit unsigned PCM data
it plays back on 2 adjacent pins
this demo also requires the setup of a SD card
its based on SPIN WAV Player Ver. 1a (Plays only mono WAV at 16ksps) by Raymond Allen
- aempirei
AIM: ambient empire
zip
10K

Comments
rdword val, ptr ' get new channel 1 frequency wrword zero, ptr shl val, #13 add val, nominal mov frqa, val add ptr, #2 ' increment to channel 2 rdword val, ptr ' get new channel 2 frequence wrword zero, ptr shl val, #13 add val, nominal mov frqb, valAlthough minor points and may not affect or improve operation here, consecutive hub accesses aren't speed efficient, it's better to interleave instructions between them when you can, updating FRQA and FRQB simultaneously would be preferable from a purist viewpoint.
Something like ..
rdword vala, ptr ' get new channel 1 frequency shl vala, #13 add vala, nominal wrword zero, ptr add ptr, #2 ' increment to channel 2 rdword valb, ptr ' get new channel 2 frequence shl valb, #13 add valb, nominal wrword zero, ptr mov frqa, vala mov frqb, valbAlso ... Is zero the best value to write to word[noparse][[/noparse]ptr] ? Can that not be a valid data item ?
Post Edited (hippy) : 4/8/2008 4:03:14 PM GMT