diff options
author | Eric Wong <e@80x24.org> | 2015-05-07 08:35:46 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-05-07 08:36:12 +0000 |
commit | 403ed90e2e7bed3e017938d76e17037b0d5059b6 (patch) | |
tree | 495cb9d926e25e587d941e22c7a784f94faff685 /test/test_rg_integration.rb | |
parent | 04d90417d3f26f0b389e58b9934941f378c92094 (diff) | |
download | dtas-403ed90e2e7bed3e017938d76e17037b0d5059b6.tar.gz |
The `gain' effect seems superior as it can "see" across the effects chain to take into account extra/lost headroom. For example, this allows me to add the the "gain -h" effect at the start of my effects chain before the RGFX placeholder in my source command, so when I play a file requiring a -6dB ReplayGain adjustment, I will only need an additional -4dB of headroom to accomodate the 10dB boost at 20Hz I use (for listening through headphones): Before: RGFX='vol -6dB' sox "$INFILE" $SOXFMT - $TRIMFX $RGFX vol -10dB equalizer 20 0.7071q 10 After: RGFX='gain -6' sox "$INFILE" $SOXFMT - $TRIMFX gain -h $RGFX equalizer 20 0.7071q 10
Diffstat (limited to 'test/test_rg_integration.rb')
-rw-r--r-- | test/test_rg_integration.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_rg_integration.rb b/test/test_rg_integration.rb index f8e81c2..efc8f97 100644 --- a/test/test_rg_integration.rb +++ b/test/test_rg_integration.rb @@ -1,8 +1,10 @@ # Copyright (C) 2013-2015 all contributors <dtas-all@nongnu.org> # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) require './test/player_integration' +require 'dtas/util' class TestRgIntegration < Testcase include PlayerIntegration + include DTAS::Util def tmp_pluck(len = 5) pluck = Tempfile.open(%w(pluck .flac)) @@ -58,10 +60,10 @@ class TestRgIntegration < Testcase assert_match expect, cur["current"]["env"]["RGFX"] end - check_gain.call(%r{vol -3dB}, "album_gain") - check_gain.call(%r{vol -2dB}, "track_gain") - check_gain.call(%r{vol 1\.3}, "track_peak") - check_gain.call(%r{vol 1\.0}, "album_peak") + check_gain.call(%r{gain -3}, "album_gain") + check_gain.call(%r{gain -2}, "track_gain") + check_gain.call(%r{gain 0\.0}, "album_peak") + check_gain.call(%r{gain 2\.5}, "track_peak") s.req_ok("rg preamp+=1") rg = YAML.load(yaml = s.req("rg")) |