NSSound doesn't play
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.