Last active
August 29, 2015 14:03
-
-
Save psyke83/a2f922bf20ff2552d795 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- ../../tinyalsa/tinymix.c 2014-07-04 03:53:43.979068284 +0100 | |
| +++ ./tinymix.c 2014-07-04 05:12:34.414652590 +0100 | |
| @@ -294,11 +294,13 @@ | |
| num_values, num_ctl_values); | |
| return; | |
| } | |
| + int buf[num_values]; | |
| for (i = 0; i < num_values; i++) { | |
| - if (mixer_ctl_set_value(ctl, i, atoi(values[i]))) { | |
| - fprintf(stderr, "Error: invalid value for index %d\n", i); | |
| - return; | |
| - } | |
| + buf[i] = atoi(values[i]); | |
| + } | |
| + if (mixer_ctl_set_array(ctl, buf, num_values)) { | |
| + fprintf(stderr, "Error: failed to set controls"); | |
| + return; | |
| } | |
| } | |
| } else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment