Re: AudioConverterConvertBuffer sample?
Re: AudioConverterConvertBuffer sample?
- Subject: Re: AudioConverterConvertBuffer sample?
- From: Ken Wieschhoff <email@hidden>
- Date: Tue, 5 Mar 2002 08:55:36 -0500
At 8:06 PM -0800 3/4/02, Doug Wyatt wrote:
On Monday, March 4, 2002, at 03:24 , Ken Wieschhoff wrote:
// Get the description from the default input unit
mStreamInDesc = GetAudioParameters();
mStreamOutDesc.mSampleRate = 44.100;
I assume you mean 44100 --
Whoops, my bad. 44100.0.
Admittedly AudioConverterConvertBuffer has no documentation, which
is doubly bad because *I* can't say for sure how it's supposed to
handle "unusual" conditions without some thought. But, that said,
the conditions under which it should work are when ioOutputDataSize,
on entry, is exactly the number of output bytes generated from
inputBufferSize.
FWIW, when I saw the parameter passed by address, I assumed it was a
maximum size so I was erring on the side of caution. Having updated
my parameters to convert from 32-bit samples to 16-bit samples and
passing a buffer size one half of the input size
AudioConverterConvertBuffer now returns noErr.
->Ken
--
- --
Ken Wieschhoff
(770)813-0231
***************************
_______________________________________________
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.