• 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
skips in file using ExtAudioFileWrite in aac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

skips in file using ExtAudioFileWrite in aac


  • Subject: skips in file using ExtAudioFileWrite in aac
  • From: Guy Shaviv <email@hidden>
  • Date: Fri, 16 Jul 2010 18:57:08 +0300

Hi,

I'm creating an audio file using several file options. When creating an aac file I get random "knocks" and skips in the audio while when creating a caf from the same audio data the audio file is generated ok.

To create aac I use:
CAStreamBasicDescription dstFormat;
dstFormat.mSampleRate = kSampleRate; 
dstFormat.mFormatID = kAudioFormatMPEG4AAC;
dstFormat.mChannelsPerFrame =  2; 
UInt32 size = sizeof(dstFormat);
AudioFormatGetProperty(kAudioFormatProperty_FormatInfo, 0, NULL, &size, &dstFormat);

To create caf I use:
CAStreamBasicDescription dstFormat;
dstFormat.mSampleRate = kSampleRate; 
dstFormat.
mFormatID = kAudioFormatLinearPCM;
dstFormat.mChannelsPerFrame = 2;
dstFormat.mBitsPerChannel = 16;
dstFormat.mBytesPerPacket = dstFormat.mBytesPerFrame = 2 * dstFormat.mChannelsPerFrame;
dstFormat.mFramesPerPacket = 1;
dstFormat.mFormatFlags = kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsSignedInteger; // little-endian

I open the file using:
OSStatus result = ExtAudioFileCreateWithURL((CFURLRef) [NSURL fileURLWithPath:file],
type,
&dstFormat,
0,
kAudioFileFlags_EraseFile,
&audioFileRef);

And write to it using ExtAudioFileWrite(). My audio is normalized so it peaks at 0.0dB.

Are there any limitations on the hardware AAC encoder that will cause it to create knocks or stop rendering? I'm suspecting the AAC encoding cause when not encoding (caf) the audio file turns out fine.

Thanks.
Guy
 _______________________________________________
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: skips in file using ExtAudioFileWrite in aac
      • From: Jonathan <email@hidden>
  • Prev by Date: Re: Core Audio playback precision on iOS devices (and simulator)
  • Next by Date: Re: Core Audio playback precision on iOS devices (and simulator)
  • Previous by thread: Re: Core Audio playback precision on iOS devices (and simulator)
  • Next by thread: Re: skips in file using ExtAudioFileWrite in aac
  • Index(es):
    • Date
    • Thread