feat(playout): configure device for alsa and pulseaudio system outputs (#2654)
### Description Add hardware configuration to liquidsoap so that users may set hardware output in config.yml. --------- Co-authored-by: jo <ljonas@riseup.net>
This commit is contained in:
parent
9d6061e42e
commit
06af18b84e
10 changed files with 149 additions and 11 deletions
|
@ -117,20 +117,41 @@ output.shoutcast(
|
|||
)
|
||||
{%- endmacro -%}
|
||||
|
||||
{% for output in config.stream.outputs.system -%}
|
||||
{% if output.enabled -%}
|
||||
# {{ output.kind.value }}:{{ loop.index }}
|
||||
{#-
|
||||
Build a system output configuration.
|
||||
#}
|
||||
{%- macro output_system(output_id, output) -%}
|
||||
# {{ output.kind.value }}:{{ output_id }}
|
||||
%ifndef output.{{ output.kind.value }}
|
||||
log("output.{{ output.kind.value }} is not defined!")
|
||||
%endif
|
||||
%ifdef output.{{ output.kind.value }}
|
||||
output.{{ output.kind.value }}(id="{{ output.kind.value }}:{{ loop.index }}", s)
|
||||
output.{{ output.kind.value }}(
|
||||
id="{{ output.kind.value }}:{{ output_id }}",
|
||||
{%- if output.kind.value == "alsa" %}
|
||||
{%- if output.device is not none %}
|
||||
device="{{ output.device }}",
|
||||
{%- endif %}
|
||||
{%- elif output.kind.value == "pulseaudio" %}
|
||||
{%- if output.device is not none %}
|
||||
device="{{ output.device }}",
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
s
|
||||
)
|
||||
%endif
|
||||
{%- endmacro -%}
|
||||
|
||||
{# ############################### #}
|
||||
|
||||
{%- for output in config.stream.outputs.system -%}
|
||||
{% if output.enabled -%}
|
||||
{{ output_system(loop.index, output) }}
|
||||
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
|
||||
{% for output in config.stream.outputs.icecast -%}
|
||||
{%- for output in config.stream.outputs.icecast -%}
|
||||
{% if output.enabled -%}
|
||||
{{ output_icecast(loop.index, output) }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue