• 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
Writing "interesting" audio formats with AudioFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing "interesting" audio formats with AudioFile


  • Subject: Writing "interesting" audio formats with AudioFile
  • From: "Timothy J. Wood" <email@hidden>
  • Date: Wed, 10 Mar 2004 19:42:31 -0800

I'm able to set up AudioFile to write a LPCM WAV file, but nothing interesting like AAC or MP3. Are there any examples on this? All the examples I see in /Developer/Examples/CoreAudio are pretty useless for compressed audio -- I can only find AIFF and WAV writing there.

I've looked at the stream formats supported for AAC and MP3 as reported by AudioFileGetGlobalInfo, but it gives nearly useless information like:


2004-03-10 19:24:07.662 af-global-info[921] 0x61647473 AAC ADTS <CFArray 0x517b10 [0xa01900e0]>{type = immutable, count = 2, values = (
0 : <CFString 0xa3b5cde4 [0xa01900e0]>{contents = "aac"}
1 : <CFString 0xa3b5cdf4 [0xa01900e0]>{contents = "adts"}
)}
format count: 1
format: 0x61616320
mSampleRate = 0.000000
mFormatID = 0x61616320
mFormatFlags = 0x00000000
mBytesPerPacket = 0
mFramesPerPacket = 0
mBytesPerFrame = 0
mChannelsPerFrame = 1
mBitsPerChannel = 0
mReserved = 0x00000000


If I feed anything like this stream format into AudioFileCreate, I get a 'fmt?' error.

I replaced the sample rate with 44100.0 and tried tweaking some of the other values to something reasonable, but I don't know what to set the packet related stuff to. How are we supposed to know what stream formats are REALLY valid?


-tim
_______________________________________________
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.


  • Prev by Date: Re: Link error with CW 9.2
  • Next by Date: Re: Writing AAC, MP3, or other compressed audio files
  • Previous by thread: Re: Link error with CW 9.2
  • Next by thread: Lag when playing through FireWire camera?
  • Index(es):
    • Date
    • Thread