Class: AudioStream::SoundInfo
- Inherits:
-
RubyAudio::SoundInfo
- Object
- RubyAudio::SoundInfo
- AudioStream::SoundInfo
- Defined in:
- lib/audio_stream/sound_info.rb
Instance Attribute Summary collapse
-
#bpm ⇒ Object
Returns the value of attribute bpm.
-
#bps ⇒ Object
readonly
Returns the value of attribute bps.
-
#window_size ⇒ Object
Returns the value of attribute window_size.
Instance Method Summary collapse
Instance Attribute Details
#bpm ⇒ Object
Returns the value of attribute bpm.
4 5 6 |
# File 'lib/audio_stream/sound_info.rb', line 4 def bpm @bpm end |
#bps ⇒ Object (readonly)
Returns the value of attribute bps.
5 6 7 |
# File 'lib/audio_stream/sound_info.rb', line 5 def bps @bps end |
#window_size ⇒ Object
Returns the value of attribute window_size.
3 4 5 |
# File 'lib/audio_stream/sound_info.rb', line 3 def window_size @window_size end |
Instance Method Details
#clone ⇒ Object
20 21 22 |
# File 'lib/audio_stream/sound_info.rb', line 20 def clone SoundInfo.new(channels: channels, samplerate: samplerate, format: format, window_size: window_size, bpm: bpm) end |
#framerate ⇒ Object
7 8 9 |
# File 'lib/audio_stream/sound_info.rb', line 7 def framerate self.samplerate.to_f / self.window_size end |
#sync_rate ⇒ Object
16 17 18 |
# File 'lib/audio_stream/sound_info.rb', line 16 def sync_rate self.samplerate.to_f / self.bps end |