From 1c598d4cee30cc9f18bdbed9f92c74876ea8ca97 Mon Sep 17 00:00:00 2001 From: Thomas Scholtes Date: Fri, 4 Apr 2014 20:52:37 +0200 Subject: [PATCH] Add replaygain target level for gstreamer --- beetsplug/replaygain.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index 228db080f..9fa894177 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -87,7 +87,6 @@ class CommandBackend(Backend): config.add({ 'command': u"", 'noclip': True, - 'targetlevel': 89, }) self.command = config["command"].get(unicode) @@ -229,6 +228,8 @@ class GStreamerBackend(object): # to rganalsys should have their gain computed, even if it # already exists. self._rg.set_property("forced", True) + self._rg.set_property("reference-level", + config["targetlevel"].as_number()) self._sink = self.Gst.ElementFactory.make("fakesink", "sink") self._pipe = self.Gst.Pipeline() @@ -459,6 +460,7 @@ class ReplayGainPlugin(BeetsPlugin): 'overwrite': False, 'auto': True, 'backend': u'command', + 'targetlevel': 89, }) self.overwrite = self.config['overwrite'].get(bool)