#include "mem.h"
#include "log.h"
#include "uaudio.h"
+#include "configuration.h"
#ifndef AFMT_U16_NE
# if BYTE_ORDER == BIG_ENDIAN
/* Very specific buffer size requirements here apparently */
uaudio_thread_start(callback, userdata, oss_play,
4608 / uaudio_sample_size,
- 4608 / uaudio_sample_size);
+ 4608 / uaudio_sample_size,
+ 0);
#else
/* We could SNDCTL_DSP_GETBLKSIZE but only when the device is already open,
* which is kind of inconvenient. We go with 1-4Kbyte for now. */
uaudio_thread_start(callback, userdata, oss_play,
32 / uaudio_sample_size,
- 4096 / uaudio_sample_size);
+ 4096 / uaudio_sample_size,
+ 0);
#endif
}
}
}
+static void oss_configure(void) {
+ uaudio_set("device", config->device);
+ uaudio_set("mixer-device", config->mixer);
+ uaudio_set("mixer-channel", config->channel);
+}
+
const struct uaudio uaudio_oss = {
.name = "oss",
.options = oss_options,
.close_mixer = oss_close_mixer,
.get_volume = oss_get_volume,
.set_volume = oss_set_volume,
+ .configure = oss_configure,
};
#endif