diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-08-25 06:14:08 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-08-25 06:14:08 +0000 |
commit | 3fb233fd768f3dbce2a3073ba596458871cec93e (patch) | |
tree | b113aba02bbf187a170f07a74259fe0f6f61bdd6 /lib/dtas/source.rb | |
parent | 93a6944e23e30b3940c7fa8d7c0c9a042036ec05 (diff) | |
download | dtas-3fb233fd768f3dbce2a3073ba596458871cec93e.tar.gz |
We documented this behavior in dtas-player.txt but failed to implement it. Now our behavior matches the documentation!
Diffstat (limited to 'lib/dtas/source.rb')
-rw-r--r-- | lib/dtas/source.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dtas/source.rb b/lib/dtas/source.rb index 404d2b0..747fa9f 100644 --- a/lib/dtas/source.rb +++ b/lib/dtas/source.rb @@ -34,6 +34,7 @@ class DTAS::Source # :nodoc: @offset = offset @comments = nil @samples = nil + @rg = nil end # this exists mainly to make the mpris interface easier, but it's not @@ -120,7 +121,8 @@ class DTAS::Source # :nodoc: end def replaygain - DTAS::ReplayGain.new(comments) || DTAS::ReplayGain.new(mp3gain_comments) + @rg = DTAS::ReplayGain.new(comments) || + DTAS::ReplayGain.new(mp3gain_comments) end def spawn(format, rg_state, opts) @@ -131,6 +133,7 @@ class DTAS::Source # :nodoc: # make sure these are visible to the "current" command... @env["TRIMFX"] = @offset ? "trim #@offset" : nil @env["RGFX"] = rg_state.effect(self) || nil + e.merge!(@rg.to_env) if @rg @pid = dtas_spawn(e.merge!(@env), command_string, opts) end |