Palmman wrote:
sndstreamcreateextended is always returning 4096 no matter what value I give
Err (
*SndStreamVariableBufferCallback
) (
void *userDataP,
SndStreamRef stream,
void *bufferP,
UInt32 *bufferSizeP
// memcpy
*bufferSizeP = 1024; // Here I assign, but alwayes I get *bufferSizeP = 4096;
As stated in the API Reference for SndStreamCreateExtended:
bufferSize
Preferred size (in frames) for the buffers that are passed to
callback. Note that the actual buffer size (as allocated by the
Sound Manager) may be different from this request.
and for
SndStreamVariableBufferCallback
In output mode, your callback function should write data into the data
buffer and then reset *bufferSizeP to the amount of data that was
actually written. Unlike SndStreamBufferCallback()
<http://www.palmos.com/dev/support/docs/palmos/PalmOSReference/SoundManager.html#1041156>,
your callback function is not required to fill the entire buffer with data.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/