Class: Voicemeeter::Bus

Inherits:
IRemote show all
Includes:
Channel_Meta_Functions, Mixin::Fades, Mixin::Return
Defined in:
lib/voicemeeter/bus.rb

Direct Known Subclasses

PhysicalBus, VirtualBus

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Conversions

Boolean

Methods included from Mixin::Fades

#fadeby, #fadeto

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

#deviceObject

Returns the value of attribute device.



12
13
14
# File 'lib/voicemeeter/bus.rb', line 12

def device
  @device
end

#levelsObject

Returns the value of attribute levels.



12
13
14
# File 'lib/voicemeeter/bus.rb', line 12

def levels
  @levels
end

#modeObject

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

#identifierObject



34
35
36
# File 'lib/voicemeeter/bus.rb', line 34

def identifier
  "bus[#{@index}]"
end