Problems getting a m4a file to loop using NSMovieView
Problems getting a m4a file to loop using NSMovieView
- Subject: Problems getting a m4a file to loop using NSMovieView
- From: Andrew Sage <email@hidden>
- Date: Thu, 24 Nov 2005 11:36:54 +0000
Sorry for posting this again, but I received no responses last time
and this problem
is now turning into a show stopping issue.
I am having problems getting my background music m4a file to loop
using NSMovieView running on 10.4.3. The music reaches the end and
does not loop back to the start.
In the following code, musicPlayer is defined as a NSMovieView* in
the header.
musicPlayer = [[[NSMovieView alloc] init] retain];
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"v1"
ofType:@"m4a"];
NSURL *movieUrl = [NSURL fileURLWithPath:filePath];
NSMovie *song = [[NSMovie alloc] initWithURL:movieUrl byReference:YES];
[musicPlayer setMovie:song];
[musicPlayer setLoopMode:NSQTMovieLoopingPlayback];
[musicPlayer gotoBeginning:self];
[musicPlayer start:self];
Any suggestions?
If what I am trying to do then can anyone suggest an alternative
method of playing looped music in a Cocoa application?
_______________________________________________
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