Re: How to make Metronome?
Re: How to make Metronome?
- Subject: Re: How to make Metronome?
- From: "I. Savant" <email@hidden>
- Date: Sun, 3 Sep 2006 09:16:45 -0400
The sound is cached like an image with [NSImage
imageNamed:@"foo"], which is why I didn't comment on that. :-) The
problem with NSSound is that there's no "stop" so that a sound
lasting more than half a second won't be "doubled" if there's a less-
than-half-second gap between plays.
--
I.S.
On Sep 3, 2006, at 12:08 AM, John Pannell wrote:
I suspect that creating a new sound object every time the method is
called is a bad idea (although NSSound probably caches the sound
after the first load for performance). I would recommend making
the sound an instance variable, loading it before the metronome
starts, and playing it in the handleTimer: method.
_______________________________________________
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