Update of /cvsroot/alsa/alsa-utils/alsamixer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9166
Modified Files:
alsamixer.c
Log Message:
show single values for mono volumes.
Index: alsamixer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-utils/alsamixer/alsamixer.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- alsamixer.c 16 Feb 2004 16:44:06 -0000 1.71
+++ alsamixer.c 11 May 2004 16:58:48 -0000 1.72
@@ -836,14 +836,21 @@
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--;
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog