Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

run2thesun

macrumors newbie
Original poster
Nov 3, 2005
9
0
Hi,

I want to extract audio from a Movie and store it in another Movie.

I have used MovieAudioExtractionFillBuffer to extract audio from a Movie. After I have stored the PCM data in a memory buffer, how can I make a new Movie out of this data? Thanks.
 

run2thesun

macrumors newbie
Original poster
Nov 3, 2005
9
0
OK I've found a function that can do this: AddMediaSample2

OSErr AddMediaSample2 (
Media theMedia,
const UInt8 *dataIn,
ByteCount size,
TimeValue64 decodeDurationPerSample,
TimeValue64 displayOffset,
SampleDescriptionHandle sampleDescriptionH,
ItemCount numberOfSamples,
MediaSampleFlags sampleFlags,
TimeValue64 *sampleDecodeTimeOut );

I have the sound data stored in two arrays (one for each channel). I need to send it in as the dataIn parameter. How can I do this? Do I send in a pointer to the sound data? Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.