View Full Version : Converting PCM data to a Movie

Nov 17, 2005, 03:03 PM

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.

Nov 24, 2005, 12:36 PM
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.