Skip to content

Commit

Permalink
Merge pull request #60 from orchetect/dev
Browse files Browse the repository at this point in the history
Reverted timeTag to current mach time
  • Loading branch information
orchetect authored Dec 6, 2021
2 parents 0b42c79 + 0d88eac commit e33e304
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extension UnsafeMutablePointer where Pointee == MIDIPacketList {
// return nil
// }

let timeTag: UInt64 = 0 // 0 means "now"
let timeTag: UInt64 = mach_absolute_time()

let packetListPointer: UnsafeMutablePointer<MIDIPacketList> = .allocate(capacity: 1)

Expand Down Expand Up @@ -90,7 +90,8 @@ extension UnsafeMutablePointer where Pointee == MIDIPacketList {
)
}

let timeTag: UInt64 = 0 // 0 means "now"
// As per Apple docs, timeTag must not be 0 when a packet is sent with `MIDIReceived()`. It must be a proper timeTag.
let timeTag: UInt64 = mach_absolute_time()

let packetListPointer: UnsafeMutablePointer<MIDIPacketList> = .allocate(capacity: 1)

Expand Down

0 comments on commit e33e304

Please sign in to comment.