I want to integrate sound and light in a plastic model i am building and thought i could use my fez panda 2 for this. Basically there need to be some leds set (brightness, fading), a servo needs to be controlled and wave files of up to 20secs should be played - and all synchronously. I already tried out that wave-playback example but found out that playing back wav files of more that 2secs (8bit, 8khz) is not possible due to the limited ram of the cpu. So i tried out some other methods to play back longer wave-files, with unsatisfying results:
directly reading out the separate samples as bytes from the sd-card without buffering via filestream
=> playback too slow (caused by slow filestream implementation?)
splitting up the wav-file into smaller chunks and playing them back one after another (with loading from sd-card in between)
=> hearable intermissions between the chunks
My next approaches would be to add some additional ram to the board to enlarge the physical buffer size (is this possible in the form of sram-chips?) or to use some kind of threaded double-buffering, but im not sure how complicated the latter would become. In addition, at a later stage the three outputs (led-brightness, servo-position, wave-playback) should be synchronous. The quality of 8bit, 8khz itself is actually ok for that application.
Maybe you have some more helping ideas or resources what i could do to play back longer wave-files.