• 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: 'aach' available but fails with format error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'aach' available but fails with format error


  • Subject: Re: 'aach' available but fails with format error
  • From: Ethan Funk <email@hidden>
  • Date: Mon, 28 Mar 2011 10:26:23 -0700

I'm using interleaved packet for the input format.  mixerInputFormat is defined elsewhere.  A converter and other processing (not shown) converts between the mixerInput and the StreamFormat.

AudioStreamBasicDescription tempFormat;
int value;
OSStatus err;

parent->StreamFormat = mixerInputFormat;
parent->StreamFormat.mFormatFlags = parent->StreamFormat.mFormatFlags & ~kAudioFormatFlagIsNonInterleaved;
parent->StreamFormat.mSampleRate = atof(GetMetaData(parent->UID, "SampleRate").c_str());
if(atoi(GetMetaData(parent->UID, "Mode").c_str())){
parent->StreamFormat.mChannelsPerFrame = 2;
}else{
parent->StreamFormat.mChannelsPerFrame = 1;    
}
parent->StreamFormat.mBytesPerFrame = (parent->StreamFormat.mBitsPerChannel * parent->StreamFormat.mChannelsPerFrame) / 8;
parent->StreamFormat.mBytesPerPacket = parent->StreamFormat.mBytesPerFrame;
parent->StreamFormat.mFramesPerPacket = 1;
tempFormat.mSampleRate = parent->StreamFormat.mSampleRate;
if(GetMetaData(parent->UID, "Codec") == "aacplus")
tempFormat.mFormatID = kAudioFormatMPEG4AAC_HE;
else
tempFormat.mFormatID = kAudioFormatMPEG4AAC;

tempFormat.mChannelsPerFrame = parent->fileStreamFormat.mChannelsPerFrame;
tempFormat.mFormatFlags = 0;
tempFormat.mBytesPerFrame = 0;
tempFormat.mBytesPerPacket = 0;
tempFormat.mBitsPerChannel = 0;
tempFormat.mFramesPerPacket = 1024;


err = AudioConverterNew(&parent->StreamFormat, &tempFormat, &aacEncoder);


On Mar 28, 2011, at 8:58 AM, Eric Allamanche wrote:

How do your input/output AudioStreamBasicDescriptions look like exactly? Especially, what's the mFramesPerPacket value set to?

Eric

 _______________________________________________
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: 
 >Available codecs (From: Ethan Funk <email@hidden>)
 >Re: Available codecs (From: Anders Norlander <email@hidden>)
 >'aach' available but fails with format error (From: Ethan Funk <email@hidden>)
 >Re: 'aach' available but fails with format error (From: Eric Allamanche <email@hidden>)

  • Prev by Date: Re: 'aach' available but fails with format error
  • Next by Date: Audio Unit Supported Channels
  • Previous by thread: Re: 'aach' available but fails with format error
  • Next by thread: Re: 'aach' available but fails with format error
  • Index(es):
    • Date
    • Thread