mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 19:16:31 +01:00
show single values for mono volumes.
This commit is contained in:
parent
25dba8a7f2
commit
e4d3e84845
1 changed files with 15 additions and 8 deletions
|
@ -836,14 +836,21 @@ mixer_update_cbar (int elem_index)
|
|||
mvaddstr (y, x, " ");
|
||||
if (mixer_type[elem_index] & MIXER_ELEM_HAS_VOLUME) {
|
||||
mixer_dc (DC_TEXT);
|
||||
sprintf (string, "%ld", vleft);
|
||||
mvaddstr (y, x + 3 - strlen (string), string);
|
||||
mixer_dc (DC_CBAR_FRAME);
|
||||
mvaddch (y, x + 3, '<');
|
||||
mvaddch (y, x + 4, '>');
|
||||
mixer_dc (DC_TEXT);
|
||||
sprintf (string, "%ld", vright);
|
||||
mvaddstr (y, x + 5, string);
|
||||
if (chn_right == SND_MIXER_SCHN_UNKNOWN) {
|
||||
/* mono */
|
||||
sprintf (string, "%ld", vleft);
|
||||
mvaddstr (y, x + 4 - strlen (string) / 2, string);
|
||||
} else {
|
||||
/* stereo */
|
||||
sprintf (string, "%ld", vleft);
|
||||
mvaddstr (y, x + 3 - strlen (string), string);
|
||||
mixer_dc (DC_CBAR_FRAME);
|
||||
mvaddch (y, x + 3, '<');
|
||||
mvaddch (y, x + 4, '>');
|
||||
mixer_dc (DC_TEXT);
|
||||
sprintf (string, "%ld", vright);
|
||||
mvaddstr (y, x + 5, string);
|
||||
}
|
||||
}
|
||||
y--;
|
||||
|
||||
|
|
Loading…
Reference in a new issue