• 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: rendering output to a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rendering output to a file


  • Subject: Re: rendering output to a file
  • From: "tahome izwah" <email@hidden>
  • Date: Sun, 25 May 2008 22:27:21 +0200

Most likely because you need to define mBytesPerPacket,
mBytesPerFrame, mBitsPerChannel and mFormatFlags to be something other
than 0. The header needs to match the data that you're providing,
otherwise you'll get a format error.

--th


2008/5/22 Ashley Allen <email@hidden>:
> Hi Tahome,
> Thanks for the suggestion. I was able to write to a file and use afplay to
> play it back!!!!
> The following parameters are passed to the ExtAudioFileCreateNew for the
> stream description which works.
> fileformat.mSampleRate = 44100.0;
> fileformat.mFormatID = kAudioFormatMPEG4AAC;
> fileformat.mFormatFlags = 0;
> fileformat.mBytesPerPacket = 0;
> fileformat.mFramesPerPacket = 1024;
> fileformat.mBytesPerFrame = 0;
> fileformat.mChannelsPerFrame = 2;
> fileformat.mBitsPerChannel = 0;
> fileformat.mReserved = 0;
> If I change the format to linear pcm the create call fails complaining about
> the format. I don't understand why.  I copied these settings from an
> example, so how they relate to each other is unclear to me. Do different
> encodings require different settings? What's the strategy for determining
> these values? It seems to depend on hardware and data rates. Are there
> formulas or libraries to calculate these settings for different encodings?
> Also, if I try to change the file type from caff to m4af or mp4f, the file
> gets created but the number of bytes are set to zero. Neither QuickTime or
> iTunes can play the contents. I'm doing something wrong considering the file
> should be encoded as a  kAudioFormatMPEG4AAC.
> Thanks again,
> Ashley
 _______________________________________________
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: rendering output to a file
      • From: William Stewart <email@hidden>
References: 
 >rendering output to a file (From: Ashley Allen <email@hidden>)

  • Prev by Date: Re: cocoa UI in aulab?
  • Next by Date: Re: AudioQueue: detecting buffer underrun (again...)
  • Previous by thread: rendering output to a file
  • Next by thread: Re: rendering output to a file
  • Index(es):
    • Date
    • Thread