mirror of
https://github.com/gryf/wmamixer.git
synced 2025-12-24 15:12:35 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1a21b9d42f | |||
| a60507c8df | |||
| 93e9c32cfc |
10
README.rst
10
README.rst
@@ -53,9 +53,13 @@ which will output several lines of information and options:
|
||||
user@linux ~ $ wmamixer -l red -b '#ffff00' # red led on yellow background
|
||||
user@linux ~ $ wmamixer -b darkslateblue # Dark Slate Blue background
|
||||
|
||||
* ``-d`` selects desired ALSA device. By default, first device is taken which
|
||||
usually is `default` and nowadays is taken by pulseaudio. To list ALSA
|
||||
devices you might use ``aplay`` program from ``alsa-utils`` package:
|
||||
* ``-d`` selects desired ALSA device. By default, first device, which is called
|
||||
``default`` is selected. That device is taken by pulseaudio nowadays, so
|
||||
you'll see only two controls: one for master volume and the other for capture
|
||||
volume. To be able to change all supported by soundcard controls, you need to
|
||||
pass right PCM device to this option. First, you need to know which device
|
||||
need to be passed as an argument to ``-d`` option. To list ALSA devices you
|
||||
might use ``aplay`` program from ``alsa-utils`` package:
|
||||
|
||||
.. code:: shell-session
|
||||
|
||||
|
||||
@@ -302,14 +302,14 @@ void Mixer_set_selem_props(struct Selem *selem, const char *name) {
|
||||
}
|
||||
}
|
||||
|
||||
void Selem_set_name(struct Selem *selem, const char *name, short int *count) {
|
||||
char new_name[5], buf[5];
|
||||
void Selem_set_name(struct Selem *selem, const char *name, short unsigned int *count) {
|
||||
char new_name[5], buf[4];
|
||||
|
||||
if (*count > 10) {
|
||||
snprintf(new_name, sizeof(new_name), "%s", name);
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf) - 1, "%s", name);
|
||||
snprintf(new_name, sizeof(new_name), "%s%d", buf, *count);
|
||||
snprintf(buf, sizeof(buf), "%s", name);
|
||||
snprintf(new_name, sizeof(new_name), "%s%hu", buf, *count);
|
||||
}
|
||||
|
||||
selem->name = strdup(new_name);
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#define CLASS "Wmamixer"
|
||||
|
||||
|
||||
#define VERSION "0.1"
|
||||
#define VERSION "1.1"
|
||||
|
||||
// User defines - custom
|
||||
#define BACKCOLOR "#202020"
|
||||
@@ -142,7 +142,7 @@ typedef struct {
|
||||
} slideCaptureMono;
|
||||
|
||||
struct NamesCount {
|
||||
short int pcm, line, lineb, mic, micb, capt, vol, aux;
|
||||
short unsigned int pcm, line, lineb, mic, micb, capt, vol, aux;
|
||||
} namesCount = {1, 1, 1, 1, 1, 1, 1, 1};
|
||||
|
||||
struct Selem *selems[32] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
@@ -194,7 +194,7 @@ void Mixer_set_right(int current, int value);
|
||||
void Mixer_set_limits(snd_mixer_elem_t *elem, struct Selem *selem);
|
||||
void Mixer_set_volume(int current, int channelIndex, int value);
|
||||
|
||||
void Selem_set_name(struct Selem *selem, const char *name, short int *count);
|
||||
void Selem_set_name(struct Selem *selem, const char *name, short unsigned int *count);
|
||||
void Selem_destroy();
|
||||
|
||||
#endif // WMAMIXER_H_
|
||||
|
||||
Reference in New Issue
Block a user