             updatePCMBuffer()
         }
     }
+    
+    /// Set the fade in time
+    open dynamic var fadeInTime: Double = 0 {
+        didSet {
+            updatePCMBuffer()
+        }
+    }
+    
+    // Set the fade out time
+    open dynamic var fadeOutTime: Double = 0 {
+        didSet {
+            updatePCMBuffer()
+        }
+    }
 
     /// return the current played AKAudioFile
     open dynamic var audioFile: AKAudioFile {

        // update this to the new value
        audioFileBuffer?.frameLength = length
    }

    /// Triggered when the player reaches the end of its playing range
    fileprivate func internalCompletionHandler() {

            }

            // Now, we'll reverse the data in the buffer if desired...
            if reversed {
                reverseBuffer()
            }
            
            if fadeInTime > 0 || fadeOutTime > 0 {
                fadeBuffer(inTime: fadeInTime, outTime: fadeOutTime)
            }

        } else {
