• 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: MTCoreAudio, CAAudioFileWriter and conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MTCoreAudio, CAAudioFileWriter and conversion


  • Subject: Re: MTCoreAudio, CAAudioFileWriter and conversion
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 10 Oct 2005 20:09:29 -1000


On 10 Oct '05, at 5:45 PM, Olivier Destrebecq wrote:

My code run, the file gets created, but then when i try to open it with Quicktime, it tells me it cannot open it. Also if i add code to try to convert to AAC before writing to disk i get an error. I include the code in this email for your review.


The code you showed us doesn't ever close the output file. Are you just killing the process after recording enough audio? As far as I can tell, an AIFF file has to be explicitly closed after writing the data, so that the writer can either add a necessary trailer or update the header. Otherwise the file isn't openable.


email@hidden wrote:

My question would be: in minimal lines of code, how would one save a sampled sound buffer (which MTCoreAudio provides) into an AIFF file.

It's really easy using CAAudioFile. You call CreateNew() on the file object, repeatedly call its Write() method passing in a buffer list, then call Close().

--Jens
 _______________________________________________
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

  • Follow-Ups:
    • Re: MTCoreAudio, CAAudioFileWriter and conversion
      • From: Olivier Destrebecq <email@hidden>
References: 
 >MTCoreAudio, CAAudioFileWriter and conversion (From: Olivier Destrebecq <email@hidden>)

  • Prev by Date: Re: MTCoreAudio, CAAudioFileWriter and conversion
  • Next by Date: Re: USB vs. FireWire
  • Previous by thread: Re: MTCoreAudio, CAAudioFileWriter and conversion
  • Next by thread: Re: MTCoreAudio, CAAudioFileWriter and conversion
  • Index(es):
    • Date
    • Thread