Re: Using AudioConverter
Re: Using AudioConverter
- Subject: Re: Using AudioConverter
- From: Doug Wyatt <email@hidden>
- Date: Sun, 17 Oct 2004 13:41:47 -0700
On Oct 16, 2004, at 6:06, Patrick Machielse wrote:
//
// convert the buffer (fails with error -50)
//
UInt32 outSize = 0;
err = AudioConverterConvertBuffer(conv,
inBufSize,
(void*)inBuf,
&outSize,
(void*)outBuf);
-50 is paramErr, a standard MacOS error code, indicating that a
function was passed an invalid parameter value. The fourth parameter is
"ioOutputDataSize". The "io" prefix indicates that the value is
significant both on entry and exit from the function. On entry it is
the size of the output buffer in bytes. On exit it is the number of
bytes written into the output buffer. AudioConverterConvertBuffer is
returning paramErr because *ioOutputDataSize is 0 on entry. Change it
to be the real size of the buffer in bytes.
hth,
Doug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden