Skip to contentSkip to conversation

Move the call to expand variables and expressions

DISCUSSION GitHub pull_request - edited 1 participant 1 message Dec 12, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

alsa-project/alsa-utils pull request #127 was edited 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 ex: we can set the expression for buffer size as follows:

buffer_size "$[($in_channels * 48) * 4]"

The buffer_size attribute value will be computed with the attribute value "in_channels" based on the expression above. So if $in_channels = 2, buffer_size will be evaluated to 384.

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