Class: Mp3gain::ApplyGainChange
- Inherits:
-
Object
- Object
- Mp3gain::ApplyGainChange
- Defined in:
- lib/mp3gain/apply_gain_change.rb
Overview
data object when gain is applied
Instance Attribute Summary collapse
-
#db_gain ⇒ Object
readonly
Returns the value of attribute db_gain.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#max_amplitude ⇒ Object
readonly
Returns the value of attribute max_amplitude.
-
#max_global_gain ⇒ Object
readonly
Returns the value of attribute max_global_gain.
-
#min_global_gain ⇒ Object
readonly
Returns the value of attribute min_global_gain.
-
#mp3_gain ⇒ Object
readonly
Returns the value of attribute mp3_gain.
Instance Method Summary collapse
- #clipping? ⇒ Boolean
-
#initialize(file_path, mp3_gain, db_gain, max_amplitude, max_global_gain, min_global_gain) ⇒ ApplyGainChange
constructor
A new instance of ApplyGainChange.
Constructor Details
#initialize(file_path, mp3_gain, db_gain, max_amplitude, max_global_gain, min_global_gain) ⇒ ApplyGainChange
Returns a new instance of ApplyGainChange.
9 10 11 12 13 14 15 16 |
# File 'lib/mp3gain/apply_gain_change.rb', line 9 def initialize(file_path, mp3_gain, db_gain, max_amplitude, max_global_gain, min_global_gain) @file_path = file_path @mp3_gain = mp3_gain @db_gain = db_gain @max_amplitude = max_amplitude @max_global_gain = max_global_gain @min_global_gain = min_global_gain end |
Instance Attribute Details
#db_gain ⇒ Object (readonly)
Returns the value of attribute db_gain.
7 8 9 |
# File 'lib/mp3gain/apply_gain_change.rb', line 7 def db_gain @db_gain end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
7 8 9 |
# File 'lib/mp3gain/apply_gain_change.rb', line 7 def file_path @file_path end |
#max_amplitude ⇒ Object (readonly)
Returns the value of attribute max_amplitude.
7 8 9 |
# File 'lib/mp3gain/apply_gain_change.rb', line 7 def max_amplitude @max_amplitude end |
#max_global_gain ⇒ Object (readonly)
Returns the value of attribute max_global_gain.
7 8 9 |
# File 'lib/mp3gain/apply_gain_change.rb', line 7 def max_global_gain @max_global_gain end |
#min_global_gain ⇒ Object (readonly)
Returns the value of attribute min_global_gain.
7 8 9 |
# File 'lib/mp3gain/apply_gain_change.rb', line 7 def min_global_gain @min_global_gain end |
#mp3_gain ⇒ Object (readonly)
Returns the value of attribute mp3_gain.
7 8 9 |
# File 'lib/mp3gain/apply_gain_change.rb', line 7 def mp3_gain @mp3_gain end |
Instance Method Details
#clipping? ⇒ Boolean
18 19 20 21 |
# File 'lib/mp3gain/apply_gain_change.rb', line 18 def clipping? # if > 31000 -> clipping @max_amplitude > 31_000 end |