Re: how to control NSSound
Re: how to control NSSound
- Subject: Re: how to control NSSound
- From: Brian Webster <email@hidden>
- Date: Wed, 15 Aug 2001 12:56:21 -0500
On Wednesday, August 15, 2001, at 12:15 PM, cocoa-dev-
email@hidden wrote:
NSSound does not seem to have any methods to control volume or play. Is
there a way to do any of the following things- control volume, loop,
check if sound is playing now?
You can use the setDelegate: method to assign a delegate to a
sound that will be sent a sound:didFinishPlaying: message when
the sound finishes playing. You should be able to do a loop by
just re-playing the sound when it finishes. You can send an
isPlaying message to the sound to ask whether it is still
playing. I don't think you can control the volume of an
NSSound; you'd probably need to look into CoreAudio for that
functionality.
--
Brian Webster
email@hidden
http://www.owlnet.rice.edu/~bwebster