• 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: Audio data format and file type - how to match?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio data format and file type - how to match?


  • Subject: Re: Audio data format and file type - how to match?
  • From: William Stewart <email@hidden>
  • Date: Mon, 24 Jul 2006 17:41:53 -0700

Would this be something like:

    @constant   kAudioFileGlobalInfo_AvailableFormatIDs
					Specifier is a pointer to a AudioFileTypeID containing a file type.
					Returns a array of format IDs for formats that can be read.

Which is a property that is used with AudioFileGetGlobalInfo its one call (well actually a couple because first of all you have to find out how big the property is), and it does exactly what you describe below.

This code is what is used in the code that Doug referred you too

Thanks

Bill


On 22/07/2006, at 2:39 PM, tahome izwah wrote:

Thanks... but... isn't there a simpler way to determine a compatibility matrix?

Something like...

CAGetCompatibleFileTypesFromStreamType(char *fileType, AudioFileTypeID
*type, long *numTypes);

...or CAGetCompatibleStreamTypesFromFileType() for doing the reverse?
In my humble opinion, this whole CoreAudio business seems overly
complicated and has a pretty steep learning curve. ExtAudioFile is a
step in the right direction, but some things (like matching file type
and stream format) are still very inconvenient and require a lot of
coding...

Thanks for listening,
--th


2006/7/21, Doug Wyatt <email@hidden>:

On Jul 20, 2006, at 23:13 , tahome izwah wrote:

> Hi all,
>
> I have a question about the four char codes describing the audio data
> format and the actual file types of the files that can hold such
> data... is there any call that tells me from such a four char code
> what the right file type(s) should/can be?
>
> For instance, if I let the user select from a list of encoding options
> in a save-as dialog box and he selects "MPEG-4 AAC" (corresponding to
> the four char code kAudioFormatMPEG4AAC in an
> AudioStreamBasicDescription that I set up), how do I know what file
> type I have to pass to ExtAudioFileCreateNew() to create the correct
> audio file (in this case kAudioFileM4AType)?
>
> To be future-proof, I'd not like to go through all the available file
> types manually so I guess there must be an option/call that I can
> use...?


Have a look at /Developer/Examples/CoreAudio/PublicUtility/
CAAudioFileFormats.cpp

Also in /Developer/Examples/CoreAudio/PublicUtility/Services/
AudioFileTools, try the "audioformats" tool.

Doug

--
Doug Wyatt
Core Audio, Apple


_______________________________________________
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


References: 
 >Audio data format and file type - how to match? (From: "tahome izwah" <email@hidden>)
 >Re: Audio data format and file type - how to match? (From: Doug Wyatt <email@hidden>)
 >Re: Audio data format and file type - how to match? (From: "tahome izwah" <email@hidden>)

  • Prev by Date: Re: proper way to disconnect AUs
  • Next by Date: Re: Building PhantomAudioDriver on OSX 10.4.7 with XCode 2.3
  • Previous by thread: Re: Audio data format and file type - how to match?
  • Next by thread: Cannot Load Audio Unit
  • Index(es):
    • Date
    • Thread