Skip to contentSkip to conversation

Move the call to expand variables and expressions

DISCUSSION GitHub pull_request - opened 1 participant 1 message Dec 11, 2021 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/alsa-utils pull request #127 was opened from ranj063:

With the addition of the math expression evaluator in alsa-lib, we can use it to evaluate simple math expresionns for objects attribute values based on other attributes.

For example to calculate the size attribute in buffer objects:
size "$[$[$[$periods * $sample_size] * $channels] * $[$[$rate * $period]]] / 1000000"

The size attribute value will be computed from the values for the periods, sample_size, channels, rate and period attribute values set in the buffer object.

Request URL : https://github.com/alsa-project/alsa-utils/pull/127
Patch URL : https://github.com/alsa-project/alsa-utils/pull/127.patch
Repository URL: https://github.com/alsa-project/alsa-utils