Mailing Lists: Apple Mailing Lists

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

Adding audio to a movie file



Hi,
I want to add an sudio file as a Media track to my movie file. How can
i do this in Cocoa? Here is some of my code..
NSString *Example_Path;
Example_Path = [[NSBundle mainBundle] pathForResource:
@"/Users/Shared/Audio Recording" ofType: @"m4a"];

//Add track
audioTrack = NewMovieTrack(_movie, width << 16, height << 16, 0);
theError = GetMoviesError();
if(theError) {
	NSLog(@"NewMovieTrack() failed with error %i", theError);
	[self release];
	return nil;
}
		
//Create track media
audioMedia = NewTrackMedia(audioTrack, SoundMediaType,
ICMCompressionSessionGetTimeScale(_compressionSession), 0, 0);
theError = GetMoviesError();
if(theError) {
	NSLog(@"NewTrackMedia() failed with error %i", theError);
	[self release];
	return nil;
}

How do i specify that i want the audio file as my audioMedia in my file?

Any help would be brilliant!
Thanks,
Jeff
_______________________________________________
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


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.