Re: AudioFile problems with DVI ADPCM files
Re: AudioFile problems with DVI ADPCM files
- Subject: Re: AudioFile problems with DVI ADPCM files
- From: William Stewart <email@hidden>
- Date: Wed, 7 Jun 2006 18:33:31 -0700
On 07/06/2006, at 5:59 PM, William Stewart wrote:
I'm confused. We make a clear distinction between the file
container (for eg, a WAV file) and the data it contains (linear PCM/
IMA/etc)...
So, you have a WAV file, and it has Intel IMA data in it (described
by a format code in the WAV file as "17"). When you try to read
this WAV file using the AudioFile API you are getting back an
unsupported format error.
AudioFile components are components that understand the file type.
As for the data contained in the file, and whether this is
understandable or not, is based on the AudioFormat and
AudioConverter API (The audio converter also uses Audio Codecs to
deal with compressed data formats).
Oh, I should also add that with AIFC and WAV files unfortunately, the
distinction is not as clear cut (because of the way the data is
stored in these files) - so it could indeed be failing legitimately
because it doesn't understand the layout of a WAV file with this data
format. (A bug is good still, as we can have a look at exactly what
is going on).
Bill
If an error is returned by AudioFileReadPackets then there is
something either wrong with the file, or something wrong with our
understanding of the file. If you could file a bug report
(bugreporter.apple.com) and attach the file we can take a look and
let you know what we think is wrong.
Sorry if I'm restating the obvious!
One other thing you can try is to look at the AudioFileTools
project in the SDK and see if afinfo (and afplay) will work with
this file.
Thanks
Bill
On 07/06/2006, at 12:29 PM, Isaac Wankerl wrote:
On 6/7/06, William Stewart <email@hidden> wrote:
The format in DVI is already Linear PCM isn't it? If so, then the
job
you have to do is to pull the audio data out of this bitstream. this
isn't an audio converter operation - the converter works by you
providing the data you have already in contiguous blocks for
transformation to some other audio format.
I should have said that this is DVI/Intel IMA ADPCM where the format
code of the wav file is 17.
This call is failing below because there is no Audio File component
that understands these files. You can write one - in which case its
main task would be too disentangle the audio data and return them
from the AudioFileReadPackets call. There's an example of this file
component in the CoreAudio SDK - /Developer/Examples/CoreAudio
Is AudioFileGetProperty() designed to return noErr when there aren't
any Audio File components that understand the format? I would expect
kAudioFileUnsupportedDataFormatError to be returned. I'll file a bug
on this.
Isaac
--
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
--
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