tooplogy: pre-processor: Add support for object arrays
alsa-project/alsa-utils pull request #216 was opened from ranj063:
Introduce a new keyword, "Objects" to instantiate multiple objects of the same class with different attirbutes. For example
Objects.Base.input_audio_format [ { in_rate [ 8000 16000 48000 ] in_bit_depth [ 32 ] in_valid_bit_depth [ 24 32 ] } ]
This would be expanded into 6 objects with the rate, bit_depth and valid_bit_depth combinations of the arrays of values above.
Object.Base.input_audio_format [ { in_rate 8000 in_bit_depth 32 in_valid_bit_depth 32 } { in_rate 16000 in_bit_depth 32 in_valid_bit_depth 32 } { in_rate 48000 in_bit_depth 32 in_valid_bit_depth 32 } { in_rate 8000 in_bit_depth 32 in_valid_bit_depth 24 } { in_rate 16000 in_bit_depth 32 in_valid_bit_depth 24 } { in_rate 48000 in_bit_depth 32 in_valid_bit_depth 24 } ]
The Objects definition is an array so that multiple combinations can be specified so that we deal with only valid combinations. For example, 16-bit bit_depth is only valid with 16-bit valid_bit_depth. So if we also want to add those combinations with the multiple rates, the definition would look like:
Objects.Base.input_audio_format [ { in_rate [ 8000 16000 48000 ] in_bit_depth [ 32 ] in_valid_bit_depth [ 24 32 ] } { in_rate [ 8000 16000 48000 ] in_bit_depth [ 16 ] in_valid_bit_depth [ 16 ] } ]
Request URL : https://github.com/alsa-project/alsa-utils/pull/216 Patch URL : https://github.com/alsa-project/alsa-utils/pull/216.patch Repository URL: https://github.com/alsa-project/alsa-utils
participants (1)
-
GitHub pull_request - opened