Class: Mp3gain::RecommendedGainChange

Inherits:
Object
  • Object
show all
Defined in:
lib/mp3gain/recommended_gain_change.rb

Overview

data object for the recommended gain change

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path, track_mp3_gain, track_db_gain, max_amplitude, max_global_gain, min_global_gain) ⇒ RecommendedGainChange



10
11
12
13
14
15
16
17
18
# File 'lib/mp3gain/recommended_gain_change.rb', line 10

def initialize(file_path, track_mp3_gain, track_db_gain, max_amplitude, max_global_gain, min_global_gain)
  @file_path = file_path
  @track_mp3_gain = track_mp3_gain
  @track_db_gain = track_db_gain
  @max_amplitude = max_amplitude
  @max_global_gain = max_global_gain
  @min_global_gain = min_global_gain
  @album_changes = nil
end

Instance Attribute Details

#album_changesObject

Returns the value of attribute album_changes.



8
9
10
# File 'lib/mp3gain/recommended_gain_change.rb', line 8

def album_changes
  @album_changes
end

#file_pathObject (readonly)

Returns the value of attribute file_path.



7
8
9
# File 'lib/mp3gain/recommended_gain_change.rb', line 7

def file_path
  @file_path
end

#max_amplitudeObject (readonly)

Returns the value of attribute max_amplitude.



7
8
9
# File 'lib/mp3gain/recommended_gain_change.rb', line 7

def max_amplitude
  @max_amplitude
end

#max_global_gainObject (readonly)

Returns the value of attribute max_global_gain.



7
8
9
# File 'lib/mp3gain/recommended_gain_change.rb', line 7

def max_global_gain
  @max_global_gain
end

#track_db_gainObject (readonly)

Returns the value of attribute track_db_gain.



7
8
9
# File 'lib/mp3gain/recommended_gain_change.rb', line 7

def track_db_gain
  @track_db_gain
end

#track_mp3_gainObject (readonly)

Returns the value of attribute track_mp3_gain.



7
8
9
# File 'lib/mp3gain/recommended_gain_change.rb', line 7

def track_mp3_gain
  @track_mp3_gain
end

Instance Method Details

#clipping?Boolean



20
21
22
23
# File 'lib/mp3gain/recommended_gain_change.rb', line 20

def clipping?
  # if > 31000 -> clipping
  @max_amplitude > 31_000
end