Class: DragonflyAudio::Plugin

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

Instance Method Summary collapse

Instance Method Details

#call(app, options = {}) ⇒ Object


8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/dragonfly_audio/plugin.rb', line 8

def call(app, options = {})
  app.add_analyser :audio_properties, Analysers::AudioProperties.new

  Analysers::AudioProperties::TAGS.each do |name|
    app.add_analyser(name) { |c| c.analyse(:audio_properties)[name] }
  end

  Analysers::AudioProperties::AUDIO_PROPS.each do |name|
    app.add_analyser(name) { |c| c.analyse(:audio_properties)[name] }
  end

  app.add_processor :tag, Processors::Tag.new
  app.add_processor :album_art, Processors::AlbumArt.new
end