module UniMIDI::Input::BufferAccess
Public Instance Methods
buffer()
click to toggle source
The device buffer @return [Array<Hash>]
# File lib/unimidi/input/buffer_access.rb, line 9 def buffer @device.buffer end
clear_buffer()
click to toggle source
Clears the input buffer @return [Array]
# File lib/unimidi/input/buffer_access.rb, line 15 def clear_buffer @device.buffer.clear end
gets_buffer(*args)
click to toggle source
Gets any messages in the buffer in the same format as Input::StreamReader#gets
. This doesn't remove the messages from the buffer or have any effect on the StreamReader
pointer position @param [*Object] args @return [Array<Hash>]
# File lib/unimidi/input/buffer_access.rb, line 23 def gets_buffer(*args) @device.buffer end
gets_buffer_data(*args)
click to toggle source
Gets any messages in the buffer in the same format as Input#gets_data
. . This doesn't remove the messages from the buffer or have any effect on the StreamReader
pointer position @param [*Object] args @return [Array<Integer>]
# File lib/unimidi/input/buffer_access.rb, line 39 def gets_buffer_data(*args) @device.buffer.map { |msg| msg[:data] } end
gets_buffer_s(*args)
click to toggle source
Gets any messages in the buffer in the same format as Input#gets_s
. This doesn't remove the messages from the buffer or have any effect on the StreamReader
pointer position @param [*Object] args @return [Array<Hash>]
# File lib/unimidi/input/buffer_access.rb, line 31 def gets_buffer_s(*args) @device.buffer.map { |msg| msg[:data] = TypeConversion.numeric_byte_array_to_hex_string(msg[:data]); msg } end