Class: NativeAudio::DelayTap
- Inherits:
-
Object
- Object
- NativeAudio::DelayTap
- Defined in:
- lib/native_audio.rb
Instance Attribute Summary collapse
-
#audio_source ⇒ Object
readonly
Returns the value of attribute audio_source.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#time_ms ⇒ Object
Returns the value of attribute time_ms.
-
#volume ⇒ Object
Returns the value of attribute volume.
Instance Method Summary collapse
-
#initialize(audio_source, id, time_ms, volume) ⇒ DelayTap
constructor
A new instance of DelayTap.
- #remove ⇒ Object
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_source ⇒ Object (readonly)
Returns the value of attribute audio_source.
27 28 29 |
# File 'lib/native_audio.rb', line 27 def audio_source @audio_source end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
27 28 29 |
# File 'lib/native_audio.rb', line 27 def id @id end |
#time_ms ⇒ Object
Returns the value of attribute time_ms.
27 28 29 |
# File 'lib/native_audio.rb', line 27 def time_ms @time_ms end |
#volume ⇒ Object
Returns the value of attribute volume.
27 28 29 |
# File 'lib/native_audio.rb', line 27 def volume @volume end |
Instance Method Details
#remove ⇒ Object
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 |