     /// - Parameter audioTime: A time in the audio render context.
     /// - Return: Time in the timeline context (seconds).
     ///
-    func time(atAudioTime audioTime: AVAudioTime?) -> Double {
+    open func time(atAudioTime audioTime: AVAudioTime?) -> Double {
         guard let baseTime = baseTime else {
             return idleTime
         }

        baseTime = audioTime?.offset(seconds: -idleTime).extrapolateTimeShimmed(fromAnchor: lastRenderTime)
        baseTime = baseTime ?? lastRenderTime.offset(seconds: AKSettings.ioBufferDuration)
    }
    var isPlaying: Bool {
        return baseTime != nil
    }

    /// Start playback immediately.
    func play() {
        play(at: nil)
    }

    /// Stops playback immediately.
    func stop() {
        guard let baseTime = baseTime else {
            return
        }

    private var baseTime: AVAudioTime?

    /// The current time in the timeline (seconds).
    open var currentTime: Double {
        get { return time(atAudioTime: nil) }
        set { setTime(newValue) }
    }

    /// Sets the current time in the timeline (seconds).
    open func setTime(_ time: Double) {
        stop()
        idleTime = time
    }
