audio: Set initial volume on software mixer
This must be set after the audio actor has injected itself into the software mixer, else it will have no effect on the GStreamer software mixer. Fixes #791
This commit is contained in:
parent
6ed8132f76
commit
e4b54426b4
@ -10,6 +10,11 @@ v0.19.2 (UNRELEASED)
|
||||
|
||||
Bug fix release.
|
||||
|
||||
**Audio**
|
||||
|
||||
- Make :confval:`audio/mixer_volume` work on the software mixer again. This
|
||||
was broken with the mixer changes in 0.19.0. (Fixes: :issue:`791`)
|
||||
|
||||
**HTTP**
|
||||
|
||||
- When using Tornado 4.0, allow WebSocket requests from other hosts. (Fixes:
|
||||
|
||||
@ -195,6 +195,14 @@ class Audio(pykka.ThreadingActor):
|
||||
self._connect(self._playbin, 'notify::volume', self._on_mixer_change)
|
||||
self._connect(self._playbin, 'notify::mute', self._on_mixer_change)
|
||||
|
||||
# The Mopidy startup procedure will set the initial volume of a mixer,
|
||||
# but this happens before the audio actor is injected into the software
|
||||
# mixer and has no effect. Thus, we need to set the initial volume
|
||||
# again.
|
||||
initial_volume = self._config['audio']['mixer_volume']
|
||||
if initial_volume is not None:
|
||||
self._mixer.set_volume(initial_volume)
|
||||
|
||||
def _on_mixer_change(self, element, gparamspec):
|
||||
self._mixer.trigger_events_for_changed_values()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user