On Wed, 4 Feb 2004 20:56:35 +0000 (GMT),
=?iso-8859-1?q?vikram=20sonawane?= <[EMAIL PROTECTED]> wrote:

>   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.

You must allocate some memory, say enough for 4 blocks, and then make
bufOrigin and bufCurrent both point to the beginning of that memory.
Then make bufPastEnd point to the address that is one byte beyond the
last bytes allocated.  See how bufPastEnd is used in my callback to
detect wrap-around.  Then, each time the callback is called, it will
advance bufCurrent by one block.  As part of the nilEvent processing,
you watch for changes in bufCurrent and process the filled buffers
accorinding.  Make sure to allow for the possibility that several
buffers may have been filled when you handle the nilEvent.


Robert Scott, Ypsilanti, MI
(reply through this forum, not by e-mailing me directly)

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to