Re: strange error using the AudioFile API
Re: strange error using the AudioFile API
- Subject: Re: strange error using the AudioFile API
- From: Bill Stewart <email@hidden>
- Date: Wed, 19 Feb 2003 18:09:15 -0800
Benjamin
Digging into this further.... There was a bug in the AudioFile code
where it did not deal correctly with the CD based audio files - we've
fixed this internally - don't know when it will be available publicly.
Looking into the opening a QT movie - yes, I believe that should fail
on the open call (and I'm surprised that it doesn't)
Bill
On Tuesday, February 18, 2003, at 11:43 PM, Benjamin Golinvaux wrote:
Bill,
I'm ok with this. QT movies should be opened by QT, period. However,
since I'm using the AudioFile
API to check whether a file can be opened and read as an audio file,
then I'm using QT if this fails,
wouldn't it be more convenient for the AudioFileOpen call to return an
error when trying to open an
unsupported file (maybe AudioFileOpen doesn't do any buffer parsing,
otoh) ? Or at least for the
property [info] getters to return an error ? Or should I assume
"being unable to parse the file" will
automatically return 0 for the mSampleRate, for example ?
Thanks for any details you might be able to provide regarding "bogus
file" management.
Benjamin Golinvaux
www.arboretum.com
On Wednesday, Feb 19, 2003, at 04:08 Europe/Paris, Bill Stewart wrote:
A QT movie is not considered an AudioFile - so the API won't parse a
movie.
Bill
On Tuesday, February 18, 2003, at 06:50 AM, Benjamin Golinvaux wrote:
Hi
I have a problem when trying to read audio from a particular file.
st =
AudioFileGetPropertyInfo(audioFileID,kAudioFilePropertyDataFormat,&pr
opertySize,&isWritable);
--> st == noErr and propertySize == 40
then
st =
AudioFileGetProperty(audioFileID,kAudioFilePropertyDataFormat,&proper
tySize,((void*)(&streamBasicDesc)));
--> st == noErr, propertySize == 40
BUT
(gdb) p streamBasicDesc
$5 = {
mSampleRate = 0,
mFormatID = 0,
mFormatFlags = 0,
mBytesPerPacket = 0,
mFramesPerPacket = 0,
mBytesPerFrame = 0,
mChannelsPerFrame = 0,
mBitsPerChannel = 0,
mReserved = 0
}
The file is a quicktime MOV with only one Sound Track. The Sound
Track format is as follows :
Sample Rate : 44.1Khz
Channels : Stereo
Sample Size : 16 bits
Compression : QDesign Music 2
I haven't tried with other files in the same codec, though.
Of course I understand the AudioFile API doesn't support each and
every codec (and maybe doesn't support movie files at all).
Actually, I'm only using it for uncompressed PCM files, and use a
Carbon Sound Converter when it's not a PCM file.
But I use the AudioFile API as a test to check if a file is
uncompressed PCM or not ! So..... should a zero-filled
AudioStreamBasicDescription be interpreted as "Sorry. I see it's an
audio file but i can't read its format....".
Wouldn't it be better to return an error code ? (Do I need to
file a bug ?)
I can provide the file if needed.
Thanks
Benjamin Golinvaux
www.arboretum.com
_______________________________________________
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.
--
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.