Class: AudioToolbox::ExtendedTempoEvent
- Inherits:
-
Object
- Object
- AudioToolbox::ExtendedTempoEvent
- Defined in:
- lib/music_player.rb,
ext/music_player/music_player.c
Instance Attribute Summary collapse
-
#bpm ⇒ Object
readonly
Returns the value of attribute bpm.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #add(time, track) ⇒ Object
-
#initialize(opts) ⇒ ExtendedTempoEvent
constructor
A new instance of ExtendedTempoEvent.
Constructor Details
#initialize(opts) ⇒ ExtendedTempoEvent
Returns a new instance of ExtendedTempoEvent.
207 208 209 |
# File 'lib/music_player.rb', line 207 def initialize(opts) @bpm = opts[:bpm] end |
Instance Attribute Details
#bpm ⇒ Object (readonly)
Returns the value of attribute bpm.
201 202 203 |
# File 'lib/music_player.rb', line 201 def bpm @bpm end |
Instance Method Details
#==(other) ⇒ Object
211 212 213 214 |
# File 'lib/music_player.rb', line 211 def ==(other) self.class == other.class && bpm == other.bpm end |
#add(time, track) ⇒ Object
203 204 205 |
# File 'lib/music_player.rb', line 203 def add(time, track) track.add_extended_tempo_event(time, @bpm) end |