[Portaudio] Re: Non interleaved buffers (2)

Dominic Mazzoni dominic@minorninth.com
Mon, 15 Oct 2001 13:19:52 -0700

> Would it be the same. Wouldn't the non-interleaved callback be:
> typedef int (PortAudioNonInterleavedCallback)(
>   void *inputBuffer[], void *outputBuffer[], ....
> versus the old
> typedef int (PortAudioCallback)(
>   void *inputBuffer, void *outputBuffer, ....

As long as you're changing the callback anyway, how about replacing it
with two callback functions?  Reasons being:

* At least on some platforms, recording and playback do not always
  want the callback at the same time.  I.e. sometimes I get the
  callback and one pointer but not the other is NULL.

* The code to handle recording and playback are often quite different
  for the application programmer.  In more cases than not it would be
  cleaner to separate these into two separate functions.

BTW, my code uses non-interleaved buffers, so I'm happy with the
option to use non-interleaved, too!

- Dominic