• 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: how to control NSSound
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: [OT] default web browser
  • Next by Date: Re: Menu wierdness
  • Previous by thread: Re: Objective-C++
  • Next by thread: Re: how to control NSSound
  • Index(es):
    • Date
    • Thread