Playing SMF midi files - another approach?
Playing SMF midi files - another approach?
- Subject: Playing SMF midi files - another approach?
- From: Ian OKeeffe <email@hidden>
- Date: Thu, 01 Dec 2005 16:12:43 +0000
- Thread-topic: Playing SMF midi files - another approach?
All,
I have found an example piece of code that plays a quicktime movie, and by
replacing the movie with a MIDI file, it plays. The only problem is that the
movie needs to be in the bundle, rather than being played from a specified
file location. Is it possible to play a local file (i.e. In the same
directory/folder as the app.), or one on the same machine?
I got the code here:
http://www.macdevcenter.com/pub/a/mac/2003/08/15/quicktime_cocoa.html?page=1
- (void) awakeFromNib
{
NSURL *Example_URL;
NSMovie *Example_Movie;
//+
// Load the movie from within the current Bundle
//-
Example_URL = [NSURL fileURLWithPath: [[NSBundle mainBundle]
pathForResource: @"invent3DM" ofType: @"mid"]];
Example_Movie = [[NSMovie alloc] initWithURL: Example_URL byReference:
YES];
Quicktime_Movie = [Example_Movie QTMovie];
If I need to submit an URL for a file, how do I find out what it is on a
Mac?
Kind regards,
Ian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden