strange error using the AudioFile API
strange error using the AudioFile API
- Subject: strange error using the AudioFile API
- From: Benjamin Golinvaux <email@hidden>
- Date: Tue, 18 Feb 2003 15:50:40 +0100
Hi
I have a problem when trying to read audio from a particular file.
st =
AudioFileGetPropertyInfo(audioFileID,kAudioFilePropertyDataFormat,&prope
rtySize,&isWritable);
--> st == noErr and propertySize == 40
then
st =
AudioFileGetProperty(audioFileID,kAudioFilePropertyDataFormat,&propertyS
ize,((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.