Re: Cannot Get AudioFile 'File Type' Info.
Re: Cannot Get AudioFile 'File Type' Info.
- Subject: Re: Cannot Get AudioFile 'File Type' Info.
- From: Doug Wyatt <email@hidden>
- Date: Thu, 1 Jul 2004 17:55:15 -0700
On Jun 30, 2004, at 2:34, Asher Vander Heiden wrote:
Hello all,
I am attempting to do what I would regard as the simplest of all
things for an AudioFile... I'm trying to find out what the type of
AudioFile it is after I have opened it.
I have used some of the sample code within the documentation to find
the Global information I am looking for using
kAudioFileGlobalInfo_FileTypeName and
kAudioFileGlobalInfo_ExtensionsForType.
BUT why on Earth can I not find out the FileTypeName for a single file
???????????
This is my greatest lead so far which I found in AudioFile.h :
// File Types: types used when specifying the type of file to create
and returned from get property (file format)
enum {
kAudioFileAIFFType = 'AIFF',
kAudioFileAIFCType = 'AIFC',
kAudioFileWAVEType = 'WAVE',
kAudioFileSoundDesigner2Type = 'Sd2f',
kAudioFileNextType = 'NeXT',
kAudioFileMP3Type = 'MPG3',
kAudioFileAC3Type = 'ac-3',
kAudioFileAAC_ADTSType = 'adts'
};
This would suggest that I use 'kAudioFilePropertyFileFormat' in
'AudioFileGetProperty' to obtain what I want. However, the
documentation tells me this .....
kAudioFilePropertyFileFormat = 'ffmt'
Passes a UInt32 that identifies the files format, based on the
Format IDs found in CoreAudioTypes.h.
Which is this ......
kAudioFormatLinearPCM = 'lpcm'
kAudioFormatAC3 = 'ac-3'
kAudioFormat60958AC3 ='cac3'
kAudioFormatMPEG = 'mpeg'
kAudioFormatAppleIMA4 = 'ima4'
kAudioFormatMPEG4AAC = 'aac '
kAudioFormatMPEG4CELP = 'celp'
kAudioFormatMPEG4HVXC = 'hvxc'
kAudioFormatMPEG4TwinVQ = 'twvq'
kAudioFormatTimeCode = 'time'
kAudioFormatMIDIStream = 'midi'
kAudioFormatParameterValueStream = 'apvs'
WHAT THE......??
That comment in the header is wrong.
kAudioFilePropertyFileFormat should be returning kAudioFileAIFFType etc.
Or are you seeing something else?
Doug
_______________________________________________
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.