| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
And it then returns an improper call order error. Huh?
Search the archives for a response from me about the conditions in which MovieAudioExtractionFillBuffer returns badCallOrder. The most common is that the movie is inactive. In your case, the problem is probably the mismatch between the AudioStreamBasicDescription's mChannelsPerFrame, and the AudioChannelLayout you set. The ACL you set only specifies 1 channel of audio, but the asbd is specifying the number of channels in the summary mix of the movie. Regardless, this is not how you want to do it.
Instead:
MovieAudioExtractionBegin(...)
Now set the property:
MovieAudioExtractionSetProperty(... kQTPropertyClass_MovieAudioExtraction_Movie, kQTMovieAudioExtractionMoviePropertyID_AllChannelsDiscrete, ... )
By default, MAE gives you non-interleaved audio, meaning a separate buffer for each channel of output. By specifying "all channels discrete", MAE will do no mixing. You just need to know the index of the channel in the source movie that you care about.
// finally, extract some data: MovieAudioExtractionFillBuffer()
In the extracted AudioBufferList, just use the one channel you care about.
The code snippet you provided would only work if you first iterated through all the tracks in the source movie and relabelled all the duplicate labelled channels to "unused".
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quicktime-api/email@hidden
| References: | |
| >Using the audio extraction API (From: Steve Israelson <email@hidden>) | |
| >Re: Using the audio extraction API (From: Brad Ford <email@hidden>) | |
| >Re: Using the audio extraction API (From: Steve Israelson <email@hidden>) | |
| >Re: Using the audio extraction API (From: Brad Ford <email@hidden>) | |
| >Re: Using the audio extraction API (From: Steve Israelson <email@hidden>) | |
| >Re: Using the audio extraction API (From: Brad Ford <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.