     
     private var audioFileBuffer: AVAudioPCMBuffer
     private var internalPlayer: AVAudioPlayerNode
+    
+    private var sampleRate : Double = 1.0
+    private var totalFrameCount : Int64
     
     /// Boolean indicating whether or not to loop the playback
     public var looping = false

    public func stop() {
        internalPlayer.stop()
    }
}

        let audioFrameCount = UInt32(audioFile.length)
        audioFileBuffer = AVAudioPCMBuffer(PCMFormat: audioFormat, frameCapacity: audioFrameCount)
        try! audioFile.readIntoBuffer(audioFileBuffer)
        // added for currentTime calculation later on
        sampleRate = audioFile.fileFormat.sampleRate
        totalFrameCount = Int64( audioFrameCount )
        
        internalPlayer = AVAudioPlayerNode()
        super.init()
