Skip to content

Commit

Permalink
much faster table drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcm93 committed Sep 6, 2017
1 parent b322377 commit 0ba7657
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 72 deletions.
Binary file not shown.
7 changes: 4 additions & 3 deletions jmc/Backend/Audio/AudioModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,11 @@ class AudioModule: NSObject {
//called when a buffer is decoded. always schedule the buffer after the end of the current one
//print("beginning of file buffer decode callback")
let newBuffer = self.currentFileBufferer!.currentDecodeBuffer
let currentBuffer = self.currentFileBufferer!.currentDecodeBuffer == self.currentFileBufferer!.bufferA ? self.currentFileBufferer!.bufferB : self.currentFileBufferer!.bufferA
let frameToScheduleAt = nextBufferStartFrame
//turns out all this math is unnecessary; scheduling 'at the end of all other buffers' is sufficient
//let currentBuffer = self.currentFileBufferer!.currentDecodeBuffer == self.currentFileBufferer!.bufferA ? self.currentFileBufferer!.bufferB : self.currentFileBufferer!.bufferA
//let frameToScheduleAt = nextBufferStartFrame
//print("scheduling buffer \(newBuffer) at frame \(frameToScheduleAt). buffer is \(newBuffer.frameLength) in length")
let time = AVAudioTime(sampleTime: frameToScheduleAt, atRate: currentBuffer.format.sampleRate)
//let time = AVAudioTime(sampleTime: frameToScheduleAt, atRate: currentBuffer.format.sampleRate)
//print(time)
curPlayerNode.scheduleBuffer(newBuffer, at: nil, options: .init(rawValue: 0), completionHandler: fileBuffererCompletion)
if isFinalBuffer == true {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ class LibraryTableViewController: NSViewController, NSMenuDelegate {
tableView.target = self
tableView.menu?.delegate = self
tableView.doubleAction = #selector(tableViewDoubleClick)
//tableView.enclosingScrollView?.wantsLayer = true
columnVisibilityMenu.delegate = self
//self.initializeColumnVisibilityMenu(self.tableView)
tableView.delegate = trackViewArrayController
Expand Down
Loading

0 comments on commit 0ba7657

Please sign in to comment.