       duration: duration, velocity: velocity, onFinished: onFinished)
   }
   
+  /**
+   
+  Gradually change the volume of the sound.
+   
+  - parameter fromVolume: the starting volume, a value from 0 to 1.
+   
+  - parameter endVolume: the end volume that will be reached at the end of the fade, a value from 0 to 1.
+   
+  - parameter duration: duration of the fade, in seconds. Default duration: 3 seconds.
+   
+  - parameter velocity: a number specifying how fast the sound volume is changing. Velocity of 0 creates a linear fade. Values greater than zero produce more exponential fade affect. Exponential fade sounds more gradual to a human ear. Default value: 2. The fade sounds most natural with velocity parameter from 2 to 5.
+   
+  - parameter onFinished: an optional closure that will be called after the fade has ended. The closure will be passed a boolean parameter `finished` indicating whether the fading has reached its end value (true) or if the fading has been cancelled (false).
+   
+  */
   open func fade(fromVolume: Double, toVolume: Double,
                  duration: Double = defaultFadeDurationSeconds,
                  velocity: Double = defaultVelocity, onFinished: ((Bool)->())? = nil) {

  
  private var onFinished: ((Bool)->())? = nil
  
  public init(player: AVAudioPlayer) {
    self.player = player
  }

      duration: duration, velocity: velocity, onFinished: onFinished)
  }
  
  /**
   
  Fade out the sound by gradually decreasing the volume.
   
  - parameter duration: duration of the fade, in seconds. Default duration: 3 seconds.
   
  - parameter velocity: a number specifying how fast the sound volume is changing. Velocity of 0 creates a linear fade. Values greater than zero produce more exponential fade affect. Exponential fade sounds more gradual to a human ear. The fade sounds most natural with velocity parameter from 2 to 5. Default value: 2.
   
  - parameter onFinished: an optional closure that will be called after the fade has ended. The closure will be passed a boolean parameter `finished` indicating whether the fading has reached its end value (true) or if the fading has been cancelled (false).
   
  */
  open func fadeOut(duration: Double = defaultFadeDurationSeconds,
                    velocity: Double = defaultVelocity, onFinished: ((Bool)->())? = nil) {
    
