Class: AudioToolbox::ExtendedTempoEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/music_player.rb,
ext/music_player/music_player.c

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bpmObject (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