>My application is too big to post, but the essentials
>are these:
>The sound stream is opened with:
>Err error = SndStreamCreate(&soundStream,
> sndInput,
> 11025, //NominalSamplesPerSecond
> sndInt16Little,
> sndMono,
> soundInCallback,
> (void*)&Ibufptrs,
> 2048, //RequestedBlockSize,
> 0); //..0 = callback is >NOT ARM..
>
>where the call back is:
>
>Err soundInCallback(void *userData,
> SndStreamRef stream,
> void *buffer,
> UInt32 frameCount)
>{
> Int16 *p;
> p = ((BufPtrs*)userData)->bufCurrent;
> if(p)
> {
>MemMove(p,buffer,RequestedBlockSize*sizeof(Int16));
> p += RequestedBlockSize;
> if(p >= ((BufPtrs*)userData)->>bufPastEnd)
> p = ((BufPtrs*)userData)->>bufOrigin;
> ((BufPtrs*)userData)->bufCurrent = p;
>
>........
>In this way, the callback does minimal processing,
>and leaves all the
>heavy lifting to the event handler.
>
>
>
hi,
could u plz tell me abt the initialisation of the
buffers i.e.
typedef struct {
Int16 *bufOrigin;
Int16 *bufPastEnd;
Int16 *bufCurrent;
} BufPtrs;
......i'm getting an error for Memmove func. saying
tht memmove to null, as i'm using the function without
initialising the first parameter i.e. the destination
buffer.
thanx,
VS
________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/