ucm: add ${eval:EXPR} substitution (Syntax 5)

It is useful to do simple integer math in UCM configurations, too.
Use snd_config_evaluate_string() string for this job.

Example:

    ${eval:1+1}
    ${eval:100*$var1}
    ${eval:$[$var2+1]/5}

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-11-30 14:19:58 +01:00
parent bf528b9066
commit 7b6da9ee6d
3 changed files with 42 additions and 5 deletions

View file

@ -40,7 +40,7 @@
#include <pthread.h>
#include "use-case.h"
#define SYNTAX_VERSION_MAX 4
#define SYNTAX_VERSION_MAX 5
#define MAX_CARD_SHORT_NAME 32
#define MAX_CARD_LONG_NAME 80