Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using the audio extraction API



Ok, so this means for a track with 2 channels, I get 2 items per sample (Float32 in my case).
But, since I only want one of those (and with a track with 10 odd channels even) how do I further refine it to pick only the one I want?

Let's say you set "all channels discrete" on a source movie with 10 channels of audio in a single audio track, and you know you want just the second channel of audio. In your resulting AudioBufferList, just use the contents of:


bufferList->mBuffers[1].mData.

The data is still non-interleaved. Unless you specifically set it to be interleaved (you do this by mucking with the flags and various other fields in the audio stream basic description).


Ok, I get it, thanks.
A bit of a waste of buffer space. This could be a big deal. If each buffer is 128K and there are say, realistically, 6 channels, and maybe 4 instances of my component, then I have 128K * 4 * 6 = 6MB of unused buffers.
Would be nice if I left the buffer pointer as NULL if the extraction API just skipped that channel instead of bailing completely.
Not too big a deal on OSX I guess, but on Windows....



But I have another issue. The missing data I discovered was my bug :) But its related to:

When I set: kQTMovieAudioExtractionMoviePropertyID_CurrentTime
How do I know which sample number is being returned?
Presumably if the timescale is 600, and the sample rate os 128K or so, 1/600th covers a lot of samples, so which one did you pick to return as the first byte?


So I go to time: 123456, the time scale is 600, the sample number you return as byte 0 is ????
I can make a guess using 64bit math, which is what I am doing, but I MAY need more accuracy.
I'll know more once I get this all working and throw it by some scientist types :)



_______________________________________________ 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

This email sent to 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>)
 >Re: Using the audio extraction API (From: Steve Israelson <email@hidden>)
 >Re: Using the audio extraction API (From: Brad Ford <email@hidden>)



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.