You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the same issue when using a combination of midi controllers (Yamaha P120 and Behringer FCB1010). I was able to fix it by making a small change to the ffi-coremidi gem:
def gets
until queued_messages?
sleep(0.0001) # <-- patch to prevent 100% CPU issue with some midi controllers
end
msgs = queued_messages
@pointer = @buffer.length
msgs
end
The issue was that 'queued_messages?' was always returning false, this slight delay seems to fix the problem without introducing any latency.
Is it normal for the CPU to go to 99% when input.gets is waiting? That's happening for me on OSX Lion with ruby 1.9.3.
It happens when running the input example code: https://github.com/arirusso/unimidi/blob/master/examples/input.rb
Also, it seems like it misses some events, and gets them on a slight delay.
The text was updated successfully, but these errors were encountered: