Thanks for the converter tip. Will use that.
The skips don't happen always, in fact, the great majority of the time they don't happen. But on certain audio data they do, and it seems related to the audio data cause when I find audio data that results in skips, it's consistent. I haven't found yet what's special about the audio data that causes the skips, or if there is a way for me to pre-distort the data to avoid them. On Jul 20, 2010, at 6:33 , Hamilton Feltman wrote: Oh one thing I forgot to mention, after changing encoder properties, you must flush the config through:
CFArrayRef config = NULL; err = ExtAudioFileSetProperty(outfile, kExtAudioFileProperty_ConverterConfig, sizeof(config), &config);
On Jul 19, 2010, at 8:31 PM, Hamilton Feltman wrote: On Jul 16, 2010, at 10:06 PM, Guy Shaviv wrote:
I've tested my code on the simulator, and on the simulator the AAC file is created fine. So I'm more and more getting the feeling this is something with the hardware encoder on the ipad.
It's working good for me on all arm7 and later devices. No skips. Is there a way to request a software encoder on the ipad or are there any parameters to control the hardware encoder, like how do I set the bit-rate of the file? I only saw a way to specify the AAC encoding type (low-complexity/high-efficiency) but not bit rate?
You want to grab out the AudioConverter from the extAudioFile, then apply settings to it
size = sizeof(AudioConverterRef); AudioConverterRef converter = NULL; err = ExtAudioFileGetProperty(outfile, kExtAudioFileProperty_AudioConverter, &size, &converter);
...
UInt32 theBitRate = 192000; err = AudioConverterSetProperty(converter, kAudioConverterEncodeBitRate, sizeof(theBitRate), &theBitRate);
Hope this helps.
|