mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 00:06:30 +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, " ");
|
mvaddstr (y, x, " ");
|
||||||
if (mixer_type[elem_index] & MIXER_ELEM_HAS_VOLUME) {
|
if (mixer_type[elem_index] & MIXER_ELEM_HAS_VOLUME) {
|
||||||
mixer_dc (DC_TEXT);
|
mixer_dc (DC_TEXT);
|
||||||
sprintf (string, "%ld", vleft);
|
if (chn_right == SND_MIXER_SCHN_UNKNOWN) {
|
||||||
mvaddstr (y, x + 3 - strlen (string), string);
|
/* mono */
|
||||||
mixer_dc (DC_CBAR_FRAME);
|
sprintf (string, "%ld", vleft);
|
||||||
mvaddch (y, x + 3, '<');
|
mvaddstr (y, x + 4 - strlen (string) / 2, string);
|
||||||
mvaddch (y, x + 4, '>');
|
} else {
|
||||||
mixer_dc (DC_TEXT);
|
/* stereo */
|
||||||
sprintf (string, "%ld", vright);
|
sprintf (string, "%ld", vleft);
|
||||||
mvaddstr (y, x + 5, string);
|
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--;
|
y--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue