• 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
Re: Does NSSound not work in a Unix tool?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does NSSound not work in a Unix tool?


  • Subject: Re: Does NSSound not work in a Unix tool?
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 21 Mar 2002 06:51:09 -0800

On Thursday, March 21, 2002, at 06:20 AM, Uli Zappe wrote:

Am Donnerstag den, 21. Mdrz 2002, um 07:35, schrieb Andrew Pinski:

Because you are not waiting for the sound to finish playing.

You're right, that's it!

[[NSSound soundNamed:@"Submarine"] play];
sleep(3);

works. :-)

Only remaining question: Do you happen to know of a more elegant method than sleep() to wait for the (actual) time when the sound is finished?

From NSSound online docs...

Methods Implemented By the Delegate
sound:didFinishPlaying:
- (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)aBool
This delegate method is called when sound playback has completed.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Does NSSound not work in a Unix tool?
      • From: Uli Zappe <email@hidden>
References: 
 >Re: Does NSSound not work in a Unix tool? (From: Uli Zappe <email@hidden>)

  • Prev by Date: Re: Cocoa's Popularity
  • Next by Date: Re: Does NSSound not work in a Unix tool?
  • Previous by thread: Re: Does NSSound not work in a Unix tool?
  • Next by thread: Re: Does NSSound not work in a Unix tool?
  • Index(es):
    • Date
    • Thread