Class: RawMIDI::Output
- Inherits:
-
Object
show all
- Includes:
- Device
- Defined in:
- lib/rawmidi/output.rb
Instance Attribute Summary
Attributes included from Device
#card, #id, #name
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Device
#close, #closed?, #handle_name, #initialize, #inspect, #open, #open?
Class Method Details
.all ⇒ Object
8
9
10
|
# File 'lib/rawmidi/output.rb', line 8
def self.all
Card.all.flat_map(&:outputs)
end
|
Instance Method Details
12
13
14
|
# File 'lib/rawmidi/output.rb', line 12
def input?
false
end
|
#output? ⇒ Boolean
16
17
18
|
# File 'lib/rawmidi/output.rb', line 16
def output?
true
end
|
#write(buffer) ⇒ Object
20
21
22
23
|
# File 'lib/rawmidi/output.rb', line 20
def write(buffer)
fail 'device is closed' if closed?
API::Device.write(@midi_p, buffer)
end
|