Re: AudioConverter
Re: AudioConverter
- Subject: Re: AudioConverter
- From: Greg Hamilton <email@hidden>
- Date: Wed, 20 Nov 2002 12:05:54 +1100
Hi,
I've seen a few mentions of the AudioConverter on this list recently.
As usual I don't know what it is or where it's documented.
help ?
Greg
On Tuesday, November 19, 2002, at 01:56 PM, Bill Stewart wrote:
You should use the AudioConverterFillBuffer if you're doing a sample
rate conversion...
The AudioFilePlay code has some fairly comprehensive examples of using
this in several examples in the CoreAudio SDK - PlayAudioFile is
probably the simplest...
Bill
On Monday, November 18, 2002, at 10:58 AM, Martin Hairer wrote:
Hi,
I think a similar issue has already been raised on this list, but I
couldn't find
it and I'm not sure it was really resolved.
The problem I am running into is that of changing the sampling rate
of a piece
of sound using an AudioConverter. When I use
AudioConverterConvertBuffer
with a comfortable value for ioOutputDataSize, I always get a
kAudioConverterErr_InvalidInputSize error, which probably means that
the
AudioConverter would like to fill up my output buffer completely but
doesn't have
enough data in the input buffer. Why doesn't it simply fill up as
much as possible
and writes the achieved size in the ioOutputDataSize variable?
In other words, is there a simple way to tell an AudioConverter to
convert some buffer
of input data into a (big) output buffer and to tell me how many
bytes were actually
written to the output buffer? I must have overlooked something
obvious, since this sounds
to me like one of the main uses for an AudioConverter...
I've already tried to call
kAudioConverterPropertyCalculateOutputBufferSize prior
to AudioConverterConvertBuffer, but it doesn't work either, since it
seems to always
return some minimal (or maximal) size for the buffer, but not the
precise size...
Thanks for any insight,
Martin
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
-- mailto:email@hidden
tel: +1 408 974 4056
_______________________________________________________________________
___
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
_______________________________________________________________________
___
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.