Skip to content

Commit

Permalink
fix backward skip crash while paused
Browse files Browse the repository at this point in the history
  • Loading branch information
jcm93 committed Aug 24, 2017
1 parent 38e50b4 commit f1133fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Binary file not shown.
14 changes: 9 additions & 5 deletions jmc/Delegate:Main Window Controller/MainWindowController.swift
Expand Up @@ -535,11 +535,15 @@ class MainWindowController: NSWindowController, NSSearchFieldDelegate, NSWindowD
offset_thing = delegate?.audioModule.track_frame_offset!
print(offset_thing)
}
let seconds = ((Double((playerTime?.sampleTime)!) + offset_thing!) / (playerTime?.sampleRate)!) - Double(delegate!.audioModule.total_offset_seconds)
if seconds > 3 {
delegate?.audioModule.skip_backward()
initializeInterfaceForNewTrack()
self.isDoneWithSkipBackOperation = true
if playerTime != nil {
let seconds = ((Double((playerTime?.sampleTime)!) + offset_thing!) / (playerTime?.sampleRate)!) - Double(delegate!.audioModule.total_offset_seconds)
if seconds > 3 {
delegate?.audioModule.skip_backward()
initializeInterfaceForNewTrack()
self.isDoneWithSkipBackOperation = true
} else {
trackQueueViewController?.skipToPreviousTrack()
}
} else {
trackQueueViewController?.skipToPreviousTrack()
}
Expand Down

0 comments on commit f1133fe

Please sign in to comment.