Class: Voicemeeter::Bus
- Includes:
- Channel_Meta_Functions, Mixin::Fades, Mixin::Return
- Defined in:
- lib/voicemeeter/bus.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#device ⇒ Object
Returns the value of attribute device.
-
#levels ⇒ Object
Returns the value of attribute levels.
-
#mode ⇒ Object
Returns the value of attribute mode.
Class Method Summary collapse
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize(remote, i) ⇒ Bus
constructor
A new instance of Bus.
Methods included from Conversions
Methods included from Mixin::Fades
Methods inherited from IRemote
#getter, #set_multi, #setter, #to_s
Constructor Details
#initialize(remote, i) ⇒ Bus
Returns a new instance of Bus.
24 25 26 27 28 29 30 31 32 |
# File 'lib/voicemeeter/bus.rb', line 24 def initialize(remote, i) super self.make_accessor_bool :mute, :mono, :eq, :eq_ab, :sel, :monitor self.make_accessor_float :gain self.make_accessor_string :label @mode = BusModes.new(remote, i) @levels = BusLevels.new(remote, i) end |
Instance Attribute Details
#device ⇒ Object
Returns the value of attribute device.
12 13 14 |
# File 'lib/voicemeeter/bus.rb', line 12 def device @device end |
#levels ⇒ Object
Returns the value of attribute levels.
12 13 14 |
# File 'lib/voicemeeter/bus.rb', line 12 def levels @levels end |
#mode ⇒ Object
Returns the value of attribute mode.
12 13 14 |
# File 'lib/voicemeeter/bus.rb', line 12 def mode @mode end |
Class Method Details
.make(remote, layout_bus) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/voicemeeter/bus.rb', line 14 def self.make(remote, layout_bus) " Factory function for Bus classes. " p_out, v_out = layout_bus.values (0...(p_out + v_out)).map do |i| i < p_out ? PhysicalBus.new(remote, i) : VirtualBus.new(remote, i) end end |
Instance Method Details
#identifier ⇒ Object
34 35 36 |
# File 'lib/voicemeeter/bus.rb', line 34 def identifier "bus[#{@index}]" end |