• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: strange error using the AudioFile API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange error using the AudioFile API


  • Subject: Re: strange error using the AudioFile API
  • From: Bill Stewart <email@hidden>
  • Date: Tue, 18 Feb 2003 19:08:37 -0800

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,&prop ertySize,&isWritable);

--> st == noErr and propertySize == 40

then

st = AudioFileGetProperty(audioFileID,kAudioFilePropertyDataFormat,&property Size,((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.
  • Follow-Ups:
    • Re: strange error using the AudioFile API
      • From: Benjamin Golinvaux <email@hidden>
References: 
 >strange error using the AudioFile API (From: Benjamin Golinvaux <email@hidden>)

  • Prev by Date: Re: Midi Interface
  • Next by Date: Re: Setting the buffer size when using the Default Output AudioUnit
  • Previous by thread: strange error using the AudioFile API
  • Next by thread: Re: strange error using the AudioFile API
  • Index(es):
    • Date
    • Thread