audio: Add a config option for queue buffer size
It may help to increase this for users that are experiencing buffering before track changes. Workaround for #1409.
This commit is contained in:
parent
23d0bd290d
commit
0580a46688
@ -169,6 +169,10 @@ Audio
|
|||||||
This should be fixed properly together with :issue:`1222`. (Fixes:
|
This should be fixed properly together with :issue:`1222`. (Fixes:
|
||||||
:issue:`1430`, PR: :issue:`1438`)
|
:issue:`1430`, PR: :issue:`1438`)
|
||||||
|
|
||||||
|
- Add a new config option, buffer_time, for setting the buffer time of the
|
||||||
|
GStreamer queue. If you experience buffering before track changes, it may
|
||||||
|
help to increase this. Workaround for :issue:`1409`.
|
||||||
|
|
||||||
Gapless
|
Gapless
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|||||||
@ -155,6 +155,16 @@ These are the available audio configurations. For specific use cases, see
|
|||||||
``gst-inspect-1.0`` to see what output properties can be set on the sink.
|
``gst-inspect-1.0`` to see what output properties can be set on the sink.
|
||||||
For example: ``gst-inspect-1.0 shout2send``
|
For example: ``gst-inspect-1.0 shout2send``
|
||||||
|
|
||||||
|
.. confval:: audio/buffer_time
|
||||||
|
|
||||||
|
Buffer size in milliseconds.
|
||||||
|
|
||||||
|
Expects an integer above 0.
|
||||||
|
|
||||||
|
Sets the buffer size of the GStreamer queue. If you experience buffering
|
||||||
|
before track changes, it may help to increase this. The default is letting
|
||||||
|
GStreamer decide the size.
|
||||||
|
|
||||||
|
|
||||||
Logging configuration
|
Logging configuration
|
||||||
=====================
|
=====================
|
||||||
|
|||||||
@ -470,6 +470,11 @@ class Audio(pykka.ThreadingActor):
|
|||||||
# systems. So leave the default to play it safe.
|
# systems. So leave the default to play it safe.
|
||||||
queue = Gst.ElementFactory.make('queue')
|
queue = Gst.ElementFactory.make('queue')
|
||||||
|
|
||||||
|
if self._config['audio']['buffer_time'] > 0:
|
||||||
|
queue.set_property(
|
||||||
|
'max-size-time',
|
||||||
|
self._config['audio']['buffer_time'] * Gst.MSECOND)
|
||||||
|
|
||||||
audio_sink.add(queue)
|
audio_sink.add(queue)
|
||||||
audio_sink.add(self._outputs)
|
audio_sink.add(self._outputs)
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ _audio_schema['mixer_track'] = Deprecated()
|
|||||||
_audio_schema['mixer_volume'] = Integer(optional=True, minimum=0, maximum=100)
|
_audio_schema['mixer_volume'] = Integer(optional=True, minimum=0, maximum=100)
|
||||||
_audio_schema['output'] = String()
|
_audio_schema['output'] = String()
|
||||||
_audio_schema['visualizer'] = Deprecated()
|
_audio_schema['visualizer'] = Deprecated()
|
||||||
|
_audio_schema['buffer_time'] = Integer(optional=True, minimum=1)
|
||||||
|
|
||||||
_proxy_schema = ConfigSchema('proxy')
|
_proxy_schema = ConfigSchema('proxy')
|
||||||
_proxy_schema['scheme'] = String(optional=True,
|
_proxy_schema['scheme'] = String(optional=True,
|
||||||
|
|||||||
@ -15,6 +15,7 @@ config_file =
|
|||||||
mixer = software
|
mixer = software
|
||||||
mixer_volume =
|
mixer_volume =
|
||||||
output = autoaudiosink
|
output = autoaudiosink
|
||||||
|
buffer_time =
|
||||||
|
|
||||||
[proxy]
|
[proxy]
|
||||||
scheme =
|
scheme =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user