|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
There’s many old posts about this but I was wondering somebody would be willing to tell me if there is a way to extract PCM data from an M4P file using Quicktime 7.3 on Windows? Currently my code calls these functions to extract PCM (leaving out variable declarations and other error checking code):
QTNewDataReferenceFromFullPathCFString(input, kQTNativeDefaultPathStyle, 0, &dataRef, &dataRefType);
NewMovieFromDataRef(&movie, newMovieActive, &id, dataRef, dataRefType);
GetMediaHandlerDescription(media, &trackType, NULL, NULL);
MovieAudioExtractionBegin(movie, 0, &audioExtraction);
sizeof(audioDesc), &audioDesc, NULL);
MovieAudioExtractionFillBuffer(audioExtraction, &requestFrames, abl, &flags);
The code I’ve written extracts valid PCM for M4A and MP3 files, but when I try to extract audio from an M4P file (one authorized to play on my machine), it brings up a dialog asking me to play the file in iTunes. All the functions return noErr but the PCM data is all 0’s. Also, and I imagine this is by design, the code will exit if I’m debugging.
The files do contain the drms atom so they are proper M4P files.
Am I missing something, using the wrong API, or is this just impossible?
Is it possible with another API available on Windows and Mac?
Will this code work on the Mac?
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.