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 "sndout_sdl.h"
19 static int sndout_null_init(void)
24 static void sndout_null_exit(void)
28 static int sndout_null_start(int rate, int stereo)
33 static void sndout_null_stop(void)
37 static void sndout_null_wait(void)
41 static int sndout_null_write_nb(const void *data, int bytes)
46 #define SNDOUT_DRIVER(name) { \
48 sndout_##name##_init, \
49 sndout_##name##_exit, \
50 sndout_##name##_start, \
51 sndout_##name##_stop, \
52 sndout_##name##_wait, \
53 sndout_##name##_write_nb, \
56 static struct sndout_driver sndout_avail[] =
67 struct sndout_driver sndout_current;
69 void sndout_init(void)
73 for (i = 0; i < sizeof(sndout_avail) / sizeof(sndout_avail[0]); i++) {
74 if (sndout_avail[i].init() == 0)
78 memcpy(&sndout_current, &sndout_avail[i], sizeof(sndout_current));
79 printf("using %s audio output driver\n", sndout_current.name);