Has anyone managed to play sampled sound on the Palm tungsten using the
Sound manager?
I'm testing the Stream Manager by outputting random samples:
SndStreamCreate(&stream, sndOutput, 44100, sndInt16, sndStereo, getbuf, 0,
8192, false);
The callback function getbuf gets called properly and is defined as follows:
UInt&6 getbuf(void *userData, SndStreamRef stream, void *buffer, UInt32
frameCount) {
Int32 buf_size=frameCount*4 // stereo and Int16 frames
char *buf_ptr=buffer;
Int32 i;
for (i=0; i<buf_size; i++) {
buf_ptr[i]=SysRandom(0)%256;
}
}
As you can see, getbuf, simply fills the buffer with random data.
The problem I encounter is that the first filled buffer gets played, but
after that nothing gets played anymore, I simply hear some kind of ticking
(although getbuf is called properly each time).
Can someone please tell me how to play random samples using the Sound
Manager?
Thanks,
David
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/