                 AKLog("ERROR AKaudioPlayer: Could not read data into buffer.")
                 return
             }
+            
+            // Now, we'll reverse the data in the buffer if desired...
+            if self.reversed {
+                reverseBuffer()
+            }
+            
         } else {
             AKLog("ERROR updatePCMBuffer: Could not set PCM buffer -> \(internalAudioFile.fileNamePlusExtension) samplesCount = 0.")
         }
+    }
+    
+    /// Turn the buffer around!
+    fileprivate func reverseBuffer() {
+        guard audioFileBuffer != nil else { return }
+        
+        let reverseBuffer = AVAudioPCMBuffer(
+            pcmFormat: internalAudioFile.processingFormat,
+            frameCapacity: audioFileBuffer!.frameCapacity )
+        
+        var j:Int = 0
+        let length = audioFileBuffer!.frameLength
+        
+        //AKLog("reverse() preparing \(length) frames")
+        
+        // i represents the normal buffer read in reverse
+        for i in (0 ..< Int(length)).reversed() {
+            // n is the channel
+            for n in 0 ..< Int(audioFileBuffer!.format.channelCount) {
+                // we write the reverseBuffer via the j index
+                reverseBuffer.floatChannelData?[n][j] = (audioFileBuffer!.floatChannelData?[n][i])!
+            }
+            j += 1
+        }
+        
+        // set the buffer now to be the reverse one
+        audioFileBuffer = reverseBuffer
+        // update this to the new value
+        audioFileBuffer?.frameLength = length
+        
+        //AKLog("Reverse new frame length: \(audioFileBuffer?.frameLength)")
+        
     }
     
     /// Triggered when the player reaches the end of its playing range

    /// Boolean indicating whether or not to loop the playback
    open var looping: Bool = false
    
    
    /// return the current played AKAudioFile
    open var audioFile: AKAudioFile {

                
                // now update the buffer
                updatePCMBuffer()
                
                // remember this value for ease of checking redundancy later
                internalEndTime = newValue
            }
        }
    }
    
