Here comes an alfa preview of my upcoming sound driver for the P2. It includes two examples of usage as well.
* Runs in a single cog
* Can mix arbitrary number of input channels (until the cog chokes) into any of the output pins
* Can output on up to 8 smart pins for surround sound
* Each input can have arbitrary sample frequency and bit depth (example, mix 16 bit CD quality @44100Hz with 8 bit samples from an old school game @12345Hz)
* Each input can use its own sample format: 8 bit signed/unsigned, 16 bit signed/unsigned, little/big endianness
* Can be used to play back single shot samples
* Can be used as a sound buffer with interrupt handling (like in modern operating systems)
* Can be used for continuous waveform playback of any size, bit depth, frequency, volume and mixed arbitrarily into any of the outputs
* Can use any combination of the three points above on any input channel (example, CD audio quality playback + waveforms + singleshots = game sound engine)
* All parameters can be changed on the fly, frequency, volume, panning, loop size.. etc (the included trackerPlayer example depends on this)
* This list will grow and change over time..
* At the moment it can mix 58 sixten bit input channels @44100 Hz in stereo mode on a P2 running @250 MHz
Fun times ahead!