1
0
mirror of https://github.com/gryf/wmamixer.git synced 2025-12-24 15:12:35 +01:00

3 Commits
0.2 ... 1.1

Author SHA1 Message Date
1a21b9d42f Fix format-truncation warnings. 2023-04-02 09:53:58 +02:00
a60507c8df Bump version to 1.0
There is no real bugs reported in last couple of years, so it is time to
mark this little software stable.
2018-05-20 17:59:19 +02:00
93e9c32cfc Readme amendment 2017-05-27 07:37:57 +02:00
3 changed files with 14 additions and 10 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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_