chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split up the multicast and unicast cases in disorder-playrtp; the
[disorder]
/
lib
/
uaudio-alsa.c
diff --git
a/lib/uaudio-alsa.c
b/lib/uaudio-alsa.c
index 2236c918b522b71587b4f7a7f64a0e00856a5246..48ae1bea52f33b2961966001bf9ad4ec25e0598d 100644
(file)
--- a/
lib/uaudio-alsa.c
+++ b/
lib/uaudio-alsa.c
@@
-26,6
+26,7
@@
#include "mem.h"
#include "log.h"
#include "uaudio.h"
#include "mem.h"
#include "log.h"
#include "uaudio.h"
+#include "configuration.h"
/** @brief The current PCM handle */
static snd_pcm_t *alsa_pcm;
/** @brief The current PCM handle */
static snd_pcm_t *alsa_pcm;
@@
-245,6
+246,12
@@
static void alsa_set_volume(int *left, int *right) {
*right = to_percent(r);
}
*right = to_percent(r);
}
+static void alsa_configure(void) {
+ uaudio_set("device", config->device);
+ uaudio_set("mixer-control", config->mixer);
+ uaudio_set("mixer-channel", config->channel);
+}
+
const struct uaudio uaudio_alsa = {
.name = "alsa",
.options = alsa_options,
const struct uaudio uaudio_alsa = {
.name = "alsa",
.options = alsa_options,
@@
-256,6
+263,7
@@
const struct uaudio uaudio_alsa = {
.close_mixer = alsa_close_mixer,
.get_volume = alsa_get_volume,
.set_volume = alsa_set_volume,
.close_mixer = alsa_close_mixer,
.get_volume = alsa_get_volume,
.set_volume = alsa_set_volume,
+ .configure = alsa_configure
};
#endif
};
#endif