Re: Using AudioConverter
Re: Using AudioConverter
- Subject: Re: Using AudioConverter
- From: Patrick Machielse <email@hidden>
- Date: Mon, 18 Oct 2004 14:04:00 +0200
op 17-10-2004 22:41 schreef Doug Wyatt
> 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.
Yes! Thank you, that's music to my ears! (really)
Being mostly a Cocoa developer, I didn't pick up the subtle indicators in
the header files. ;-)
That being said, I will file a documentation enhancement request / bug,
since the AudioConverterConvertBuffer() function is not discussed in the
Audio Toolbox documentation (at least the version that came with Xcode 1.2),
although it is referenced in it.
The function isn't by chance deprecated, as are AudioConverterFillBuffer()
c.s.?
Patrick
---
Hieper Software
e: email@hidden
w: http://www.hieper.nl
_______________________________________________
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