Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-core
Commits
419b2bba
Verified
Commit
419b2bba
authored
11 months ago
by
Ole Binder
Browse files
Options
Downloads
Patches
Plain Diff
Refactor: Consolidate input devices into list
parent
4924e292
No related branches found
No related tags found
1 merge request
!17
Yaml configuration file
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/in_soundcard.liq
+8
-11
8 additions, 11 deletions
src/in_soundcard.liq
src/settings.liq
+10
-18
10 additions, 18 deletions
src/settings.liq
with
18 additions
and
29 deletions
src/in_soundcard.liq
+
8
−
11
View file @
419b2bba
...
@@ -40,8 +40,11 @@ def get_input_line(source_id, device) =
...
@@ -40,8 +40,11 @@ def get_input_line(source_id, device) =
end
end
end
end
def create_input_line(source_id, device) =
input_count = ref(0)
in_line = get_input_line(source_id, device)
def create_input_line(device) =
source_id = "line_in_#{input_count}"
in_line = get_input_line(source_id, device.name)
# Enable metadata insertion and store callbacks
# Enable metadata insertion and store callbacks
in_line = insert_metadata(id=source_id, in_line)
in_line = insert_metadata(id=source_id, in_line)
...
@@ -65,7 +68,7 @@ def create_input_line(source_id, device) =
...
@@ -65,7 +68,7 @@ def create_input_line(source_id, device) =
fun (json_string) ->
fun (json_string) ->
begin
begin
log(
log(
"Received JSON to set track metadata on channel '
in_line_0
' to:\n #{
"Received JSON to set track metadata on channel '
#{source_id}
' to:\n #{
json_string
json_string
}"
}"
)
)
...
@@ -75,17 +78,11 @@ def create_input_line(source_id, device) =
...
@@ -75,17 +78,11 @@ def create_input_line(source_id, device) =
"OK"
"OK"
end
end
)
)
input_count := input_count() + 1
end
end
#####################################
#####################################
# SOURCES #
# SOURCES #
#####################################
#####################################
if a0_in != "" then create_input_line("in_line_0", a0_in) end
list.iter(create_input_line, config.audio.devices.input)
# if a1_in != "" then create_input_line("in_line_1", a1_in) end
# if a2_in != "" then create_input_line("in_line_2", a2_in) end
# if a3_in != "" then create_input_line("in_line_3", a3_in) end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/settings.liq
+
10
−
18
View file @
419b2bba
...
@@ -244,19 +244,8 @@ end
...
@@ -244,19 +244,8 @@ end
# we save the device name in the corresponding variable name
# we save the device name in the corresponding variable name
# I guess the variable name is then later used to create the in- and outputs
# I guess the variable name is then later used to create the in- and outputs
# a0_in = get_setting("", "input_device_0", "AURA_ENGINE_INPUT_DEVICE")
# a0_in = get_setting("", "input_device_0", "AURA_ENGINE_INPUT_DEVICE")
a0_in = list.hd(config.audio.devices.input).name
# a1_in = list.assoc(default="", "input_device_1", ini)
# a2_in = list.assoc(default="", "input_device_2", ini)
# a3_in = list.assoc(default="", "input_device_3", ini)
# a4_in = list.assoc(default="", "input_device_4", ini)
# a0_out = get_setting("", "output_device_0", "AURA_ENGINE_OUTPUT_DEVICE")
# a0_out = get_setting("", "output_device_0", "AURA_ENGINE_OUTPUT_DEVICE")
a0_out = list.hd(config.audio.devices.output).name
# a1_out = list.assoc(default="", "output_device_1", ini)
# a2_out = list.assoc(default="", "output_device_2", ini)
# a3_out = list.assoc(default="", "output_device_3", ini)
# a4_out = list.assoc(default="", "output_device_4", ini)
# ALSA / pulse settings
# ALSA / pulse settings
# soundsystem = get_setting("alsa", "soundsystem", "AURA_ENGINE_SOUNDSYSTEM")
# soundsystem = get_setting("alsa", "soundsystem", "AURA_ENGINE_SOUNDSYSTEM")
soundsystem = config.audio.soundsystem
soundsystem = config.audio.soundsystem
...
@@ -266,16 +255,19 @@ use_jack = soundsystem == "jack"
...
@@ -266,16 +255,19 @@ use_jack = soundsystem == "jack"
log(
log(
"\nAudio Settings:"
"\nAudio Settings:"
)
)
log(
def print_device(device) =
"\tOutput device: #{a0_out}"
)
if
a0_in != ""
then
log(
log(
"\t
Input device: #{a0_in
}"
"\t
\t- #{device.name
}"
)
)
end
end
log(
"\tOutput Devices:"
)
list.iter(print_device, config.audio.devices.output)
log(
"\tInput Devices:"
)
list.iter(print_device, config.audio.devices.input)
# ReplayGain Settings
# ReplayGain Settings
# enable_replaygain_resolver =
# enable_replaygain_resolver =
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment