4 * This work is licensed under the terms of any of these licenses
6 * - GNU GPL, version 2 or later.
7 * - GNU LGPL, version 2.1 or later.
9 * See the COPYING file in the top-level directory.
15 #include "linux/sndout_oss.h"
16 #include "linux/sndout_alsa.h"
17 #include "sndout_sdl.h"
20 static int sndout_null_init(void)
25 static void sndout_null_exit(void)
29 static int sndout_null_start(int rate, int stereo)
34 static void sndout_null_stop(void)
38 static void sndout_null_wait(void)
42 static int sndout_null_write_nb(const void *data, int bytes)
47 #define SNDOUT_DRIVER(name) { \
49 sndout_##name##_init, \
50 sndout_##name##_exit, \
51 sndout_##name##_start, \
52 sndout_##name##_stop, \
53 sndout_##name##_wait, \
54 sndout_##name##_write_nb, \
57 static struct sndout_driver sndout_avail[] =
71 struct sndout_driver sndout_current;
73 void sndout_init(void)
77 for (i = 0; i < sizeof(sndout_avail) / sizeof(sndout_avail[0]); i++) {
78 if (sndout_avail[i].init() == 0)
82 memcpy(&sndout_current, &sndout_avail[i], sizeof(sndout_current));
83 printf("using %s audio output driver\n", sndout_current.name);