Look into AVAssetReader from the AV Foundation framework. On OS X, this is available starting in 10.7, so it’s not quite going to cut it for your Snow Leopard users, but at least it’s 64-bit, unlike QuickTime.
You can single out the audio tracks of an MP3/AAC/MP4/MOV, walk them with the AVAssetReader, and get each sample as a CMSampleBufferRef. From that, you can get timing information, a format description, and the raw data as a CMBlockBufferRef.
—Chris
On May 22, 2015, at 6:57 AM, Vojtěch Meluzín < email@hidden> wrote:
Hi folks, I need to load AAC/MP4 (and potentially other iTunes stuff) files and extract the audio samples from them. Using a dedicated cross-platform library would be nice, but it's hard to find one and AAC seems to be trademarked by Apple anyway. So I'd like to use QuickTime for that (any other option?). So I'd first load the file: QTMovie* movie = [QTMovie movieWithFile: path error: nil]; But then I want to extract sampling rate, number of channels, and the actual samples from it. Any ideas how to do that? Is that even the "right" approach? I need to support 32&64-bit systems from 10.6 to the newest.
Cheers! Vojtech
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
|