Skip to content

Commit

Permalink
Merge pull request #10 from arirusso/0.5.1
Browse files Browse the repository at this point in the history
0.5.1
  • Loading branch information
arirusso authored Feb 15, 2022
2 parents 458c523 + 5bbe6af commit 071c9f2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source 'https://rubygems.org'
gem 'ffi', '~> 1.15', '>= 1.15.5'
gem 'rake', '~> 13.0', '>= 13.0.6', groups: %i[development test]
gem 'rspec', '~> 3.11', '>= 3.11.0', groups: %i[test]
gem 'rubocop', '~> 1.25', '>= 1.25.1', groups: %i[development test]
gem 'rubocop', '~> 1.10', '>= 1.10.0', groups: %i[development test]
2 changes: 1 addition & 1 deletion lib/coremidi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
require 'coremidi/destination'

module CoreMIDI
VERSION = '0.5.0'
VERSION = '0.5.1'
end
15 changes: 8 additions & 7 deletions lib/coremidi/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,15 @@ def enqueue_message(bytes, timestamp)
def get_event_callback
Thread.abort_on_exception = true
proc do |new_packets, _refCon_ptr, _connRefCon_ptr|
# p "packets received: #{new_packets[:numPackets]}"
timestamp = Time.now.to_f
messages = get_messages(new_packets)
messages.each do |message|
enqueue_message(message, timestamp)
begin
timestamp = Time.now.to_f
messages = get_messages(new_packets)
messages.each do |message|
enqueue_message(message, timestamp)
end
rescue Exception => e
Thread.main.raise(e)
end
rescue Exception => e
Thread.main.raise(e)
end
end

Expand Down

0 comments on commit 071c9f2

Please sign in to comment.