SKAudioNode doesn't fade volume with duration

543 Views Asked by At

I've tried to fade volume of a SKAudioNode to 0 with duration, but the duration doesn't seem to affect, the audio stops immediately:

    let fireAudio = SoundManager.sharedInstance.fire //SKAudioNode
    let stopAudio = SKAction.stop()
    let fadeVolume = SKAction.changeVolumeTo(0.0, duration: 3.0)
    let remove = SKAction.removeFromParent()
    let sequence = SKAction.sequence([fadeVolume, stopAudio, remove])
    fireAudio?.runAction(sequence)

Any suggestion? thanks

0

There are 0 best solutions below