----- Original Message -----
From: Krzysztof Mali?ski <[EMAIL PROTECTED]>
Date: Saturday, February 25, 2006 7:48 am
Subject: Re: Sound - one more
> I have tried but still i have only some pops in my speaker. Maybe
> you
> can share some working example or "repair" mine?
>
> >Here is my sound callback that I use:
> >
> >Err PlaySoundCallBack(void *userDataPtr, SndStreamRef stream, void
> *frameBuffer, UInt32 *inCount)
> >{
The signature of your callback function is incorrect; the last argument is a
UInt32, not a pointer. Furthermore, it is a count of frames, not bytes. A
frame contains 1 or 2 samples, each 1 or 2 bytes, so a frame may be up to 4
bytes long.
Err SndStreamBufferCallback (
void *userDataP,
SndStreamRef stream,
void *bufferP,
UInt32 frameCount
)
See Answer ID 40 in the PalmSource Knowledge Bank for a working example.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/