mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-20 05:33:44 -04:00
ucm: add Repeat block - repetitive pattern substitution (Syntax 9)
Implements Repeat blocks for generating repetitive configuration patterns
with variable substitution. This feature allows applying a configuration
block multiple times with different variable values, significantly reducing
duplication in UCM configuration files.
iterator abstraction allows easy extension for future pattern types.
Example:
Repeat.VolumeInit {
Pattern {
Variable 'ch'
Type Integer
First 0
Last 7
Step 1
}
Apply {
cset "name='PCM Channel ${var:ch} Volume' 100%"
}
}
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
2943b1e412
commit
27aa3e41ef
5 changed files with 540 additions and 3 deletions
|
|
@ -384,6 +384,9 @@ int uc_mgr_evaluate_condition(snd_use_case_mgr_t *uc_mgr,
|
|||
snd_config_t *parent,
|
||||
snd_config_t *cond);
|
||||
|
||||
int uc_mgr_evaluate_repeat(snd_use_case_mgr_t *uc_mgr,
|
||||
snd_config_t *cfg);
|
||||
|
||||
int uc_mgr_define_regex(snd_use_case_mgr_t *uc_mgr,
|
||||
const char *name,
|
||||
snd_config_t *eval);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue