Skip to content

Commit

Permalink
Fix midi packet initilization
Browse files Browse the repository at this point in the history
  • Loading branch information
cemolcay committed Jul 21, 2018
1 parent c7fbdc8 commit 045f26f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/MIDIEventKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extension Collection where Iterator.Element == MIDIEvent {
var packet = MIDIPacketListInit(packetListPointer)

for midi in this {
packet = MIDIPacketListAdd(packetListPointer, 65536, packet, midi.timestamp.value, midi.event.midiBytes.count, midi.event.midiBytes)
packet = MIDIPacketListAdd(packetListPointer, 1024, packet, midi.timestamp.value, midi.event.midiBytes.count, midi.event.midiBytes)
}

return packetListPointer
Expand Down Expand Up @@ -294,8 +294,9 @@ public enum MIDIChannelVoiceEvent: MIDIStatusEvent {
self = .pitchBendChange(
bend: UInt16((dataBytes.data2 << 8) | dataBytes.data1),
channel: channel)
} else {
return nil
}
return nil
}

// MARK: CustomStringConvertible
Expand Down

0 comments on commit 045f26f

Please sign in to comment.