I have a slider with volume. I need to change the volume live. What is wrong in my code?
@IBOutlet weak var volumeSliderCurr: NSSlider! @IBAction func volumeSlider(sender: AnyObject) { var event: NSEvent = NSApplication.sharedApplication().currentEvent! mouseUp(event) } override func mouseUp(theEvent: NSEvent) { super.mouseUp(theEvent) audioPlayer.volume = volumeSliderCurr.floatValue currVolume = volumeSliderCurr.floatValue }
source share