Jaroslav Kysela
ebb8a6c7a1
conf: introduce snd_config_load_string()
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-12-01 10:18:58 +01:00
Jaroslav Kysela
327bd5f28b
conf: fix test/lsb/config.c
...
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-11-30 14:41:14 +01:00
Jaroslav Kysela
9b53b1f0fb
conf: improve simple integer math expressions - brackets
...
Add brackets to the simple math expressions like:
$[($a+($val+100))/2]
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-11-30 14:35:58 +01:00
Jaroslav Kysela
bf528b9066
conf: add possibility to evaluate simple integer math expressions
...
It is useful to use the math expressions for the values in configuration.
This patch adds a simple expression evaluation routines (integer only).
The syntax is simplified unix shell (bash) style.
Examples:
$[1 + 1]
$[$[2 + 2] / $var1]
$[0xa0 | 0x05]
As a bonus, the variable substitutions were more abstracted.
The function snd_config_expand_custom() was introduced to be used
for example in the topology pre-precessor.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-11-30 11:33:35 +01:00
Clemens Ladisch
da19588063
add config tests
...
Add some test for the snd_config_* functions.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-03 13:35:01 +02:00
Clemens Ladisch
a7f744888e
test/lsb/midi_event.c: check for buffer size check
...
Add a test to check that snd_midi_event_decode() checks its output
buffer size.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-08 08:50:54 +02:00
Clemens Ladisch
61f5b8438b
test/lsb/midi_event.c: abort on fatal errors
...
If snd_midi_event_fails(), we cannot use the object and must abort the
current test.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-08 08:50:19 +02:00
Clemens Ladisch
7f73f1bb15
add midi event tests
...
Add some tests for the snd_midi_event_* functions.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-06 12:00:04 +02:00