• 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
AAC hardware encoder in ExtAudioFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AAC hardware encoder in ExtAudioFile


  • Subject: AAC hardware encoder in ExtAudioFile
  • From: Doug McCoy <email@hidden>
  • Date: Sat, 4 Dec 2010 21:08:22 -0800

I am using ExtAudioFile services to convert PCM data to AAC. But it only works on the first attempt.

Client format:
AudioStreamBasicDescription:  2 ch,  22050 Hz, 'lpcm' (0x0000000C) 16-bit little-endian signed integer

Destination format:
AudioStreamBasicDescription:  2 ch,  22050 Hz, 'aac ' (0x00000000) 0 bits/channel, 0 bytes/packet, 1024 frames/packet, 0 bytes/frame

Here is a snippet of my code:

XThrowIfError(ExtAudioFileCreateWithURL(fileURL,
                    kAudioFileM4AType,
                    &dstFormat,
                    NULL,
                    kAudioFileFlags_EraseFile,
                    &fileID), "ExtAudioFileCreateWithURL failed!");
           
size = sizeof(*clientFormat);
errorStatus = ExtAudioFileSetProperty(fileID, kExtAudioFileProperty_ClientDataFormat, size, clientFormat);
OSStatus recordError = ExtAudioFileWrite(fileID, ioByteSize / clientFormat->mBytesPerFrame, &bufferList);
ExtAudioFileDispose(fileID);


On the first use of this code, everything succeeds so I know the code works. But on subsequent uses i get 'hwiu' returned from ExtAudioFileSetProperty(). I am pretty sure this means that the AAC hardware encoder is in use, but I don't know how to correct this. Is my code not releasing the AAC codec somehow? Is this the resposibility of the developer? I figured the ExtAudioFileDispose() would release all resources.

What am I missing?







---
Check out my new iPhone app, FlipTalk. Once featured on the iTunes App Store "What's Hot" list!
http://fliptalkapp.com
http://itunes.com/apps/FlipTalk/
http://tinyurl.com/FlipTalkYoutube



 _______________________________________________
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

  • Prev by Date: Audio device icon
  • Next by Date: Physical formats
  • Previous by thread: Re: Audio device icon
  • Next by thread: Physical formats
  • Index(es):
    • Date
    • Thread