Re: Audio Converter
Re: Audio Converter
- Subject: Re: Audio Converter
- From: William Stewart <email@hidden>
- Date: Fri, 16 Dec 2005 11:48:01 -0800
Have a look at the ConvertFile example in the SDK's Simple Examples
directory.
It has two flavours, one that uses the ExtAudioFile, the other uses a
combination of the AuidoFile and AudioConverter APIs directly (kind
of what ExtAF does underneath the hood).
Bill
On 16/12/2005, at 12:26 AM, George Malayil-Philip wrote:
Hi,
I am trying to write a audio converter to convert from iTunes
ripped
.m4a files to uncompressed audio. I tried setting up a audio
converter with
the target audio format being set as
//fill in output format
OSType type;
StrToOSType("lpcm", type);
targetFormat.mFormatID = type;
targetFormat.mSampleRate = srcFileFormat.mSampleRate;
targetFormat.mChannelsPerFrame = srcFileFormat.mChannelsPerFrame;
UInt32 size = sizeof(targetFormat);
XThrowIfError(AudioFormatGetProperty
(kAudioFormatProperty_FormatInfo, 0,
NULL, &size, &targetFormat),
"getting target format info");
While no errors are thrown with this, if I then try
targetFormat.Print()
I crash with "terminate called after throwing an instance of
'CAXException'"
Calls to AudioConverterNew() also fail on account of this. I am
not sure
what I am doing wrong and would appreciate some help on this.
Another thing that has me confused is when I do
srcFileFormat.Print() it
prints
AudioStreamBasicDescription: 2 ch, 44100 Hz, 'lpcm' (0x0000002B)
32-bit
big-endian float, deinterleaved
Shouldn't the format be 'aac '? This has me a bit confused. Any
help
much appreicated. Thanks.
Regards
George M.P.
_______________________________________________
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
--
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
________________________________________________________________________
__
_______________________________________________
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