• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems getting a m4a file to loop using NSMovieView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Is NSBrowser suitable for this?
  • Next by Date: Re: Custom NSView in IB palette
  • Previous by thread: Re: Is NSBrowser suitable for this?
  • Next by thread: Re: Problems getting a m4a file to loop using NSMovieView
  • Index(es):
    • Date
    • Thread