Class: NativeAudio::DelayTap

Inherits:
Object
  • Object
show all
Defined in:
lib/native_audio.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(audio_source, id, time_ms, volume) ⇒ DelayTap

Returns a new instance of DelayTap.



29
30
31
32
33
34
# File 'lib/native_audio.rb', line 29

def initialize(audio_source, id, time_ms, volume)
  @audio_source = audio_source
  @id = id
  @time_ms = time_ms
  @volume = volume
end

Instance Attribute Details

#audio_sourceObject (readonly)

Returns the value of attribute audio_source.



27
28
29
# File 'lib/native_audio.rb', line 27

def audio_source
  @audio_source
end

#idObject (readonly)

Returns the value of attribute id.



27
28
29
# File 'lib/native_audio.rb', line 27

def id
  @id
end

#time_msObject

Returns the value of attribute time_ms.



27
28
29
# File 'lib/native_audio.rb', line 27

def time_ms
  @time_ms
end

#volumeObject

Returns the value of attribute volume.



27
28
29
# File 'lib/native_audio.rb', line 27

def volume
  @volume
end

Instance Method Details

#removeObject



46
47
48
49
# File 'lib/native_audio.rb', line 46

def remove
  NativeAudio.audio_driver.remove_delay_tap(@audio_source.channel, @id)
  @audio_source.delay_taps.delete(self)
end