• 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
NSSound doesn't play
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSSound doesn't play


  • Subject: NSSound doesn't play
  • From: Lorenzo <email@hidden>
  • Date: Sat, 26 Jul 2003 17:04:04 +0200

Hi list,
I have a problem with two NSSounds just before a small animation starts

The first one plays well:
--------------------------
[[NSSound soundNamed: @"startSound"] play];
for(i = 0; i < 100; i++){
theFrame.origin.x += increase;
[coverItem setFrame:theFrame];
[contentView display];
}
I can hear the sound playing while the object moves in the window (fine).


The second sound plays only at the end of the loop (wrong):
--------------------------
[[NSSound soundNamed: @"abortSound"] play];
for(i = 0; i < 100; i++){
theFrame.origin.x += increase;
[coverItem setFrame:theFrame];
[contentView display];
}
I can hear the last 2 seconds of the sound playing only after the loop
ended. And I never hear the first two seconds of the sound. It seems that
during the animation loop the sound is off, then at the end of the animation
the sound turns on automatically. If I delete the code about the animation,
the sound plays properly. But if I reinclude the animation loop it fails
again.
The strange thing is that if I change @"abortSound" to @"startSound", it
works properly again. So I suppose something strange is inside the sound
abortSound.aiff.

What could it be?
Any idea?


Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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: NSSound doesn't play
      • From: Chris Kane <email@hidden>
  • Prev by Date: Re: HELP! Formatter acting wrong...
  • Next by Date: Broken pipe in NSTask I/O
  • Previous by thread: was: accessing data from within a class
  • Next by thread: Re: NSSound doesn't play
  • Index(es):
    • Date
    • Thread