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.

[Also, this is now off-topic, so for follow-ups, you should probably go to the 
AV Foundation devforum at https://devforums.apple.com/community/mac/gandm/av 
<https://devforums.apple.com/community/mac/gandm/av> ]

—Chris

> On May 22, 2015, at 6:57 AM, Vojtěch Meluzín <[email protected]> 
> 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 protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/coreaudio-api/invalidname%40gmail.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to