configure.ac: Move OpenAL to Audio Output Plugins (nonstreaming), add header.
[mpd-mk.git] / src / output_list.c
blobd94749e862b57f81f9a51180eebf86b178917f45
1 /*
2 * Copyright (C) 2003-2010 The Music Player Daemon Project
3 * http://www.musicpd.org
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "config.h"
21 #include "output_list.h"
22 #include "output_api.h"
24 extern const struct audio_output_plugin shoutPlugin;
25 extern const struct audio_output_plugin null_output_plugin;
26 extern const struct audio_output_plugin fifo_output_plugin;
27 extern const struct audio_output_plugin pipe_output_plugin;
28 extern const struct audio_output_plugin alsaPlugin;
29 extern const struct audio_output_plugin ao_output_plugin;
30 extern const struct audio_output_plugin oss_output_plugin;
31 extern const struct audio_output_plugin openal_output_plugin;
32 extern const struct audio_output_plugin osxPlugin;
33 extern const struct audio_output_plugin solaris_output_plugin;
34 extern const struct audio_output_plugin pulse_output_plugin;
35 extern const struct audio_output_plugin mvp_output_plugin;
36 extern const struct audio_output_plugin jack_output_plugin;
37 extern const struct audio_output_plugin httpd_output_plugin;
38 extern const struct audio_output_plugin recorder_output_plugin;
40 const struct audio_output_plugin *audio_output_plugins[] = {
41 #ifdef HAVE_SHOUT
42 &shoutPlugin,
43 #endif
44 &null_output_plugin,
45 #ifdef HAVE_FIFO
46 &fifo_output_plugin,
47 #endif
48 #ifdef ENABLE_PIPE_OUTPUT
49 &pipe_output_plugin,
50 #endif
51 #ifdef HAVE_ALSA
52 &alsaPlugin,
53 #endif
54 #ifdef HAVE_AO
55 &ao_output_plugin,
56 #endif
57 #ifdef HAVE_OSS
58 &oss_output_plugin,
59 #endif
60 #ifdef HAVE_OPENAL
61 &openal_output_plugin,
62 #endif
63 #ifdef HAVE_OSX
64 &osxPlugin,
65 #endif
66 #ifdef ENABLE_SOLARIS_OUTPUT
67 &solaris_output_plugin,
68 #endif
69 #ifdef HAVE_PULSE
70 &pulse_output_plugin,
71 #endif
72 #ifdef HAVE_MVP
73 &mvp_output_plugin,
74 #endif
75 #ifdef HAVE_JACK
76 &jack_output_plugin,
77 #endif
78 #ifdef ENABLE_HTTPD_OUTPUT
79 &httpd_output_plugin,
80 #endif
81 #ifdef ENABLE_RECORDER_OUTPUT
82 &recorder_output_plugin,
83 #endif
84 NULL
87 const struct audio_output_plugin *
88 audio_output_plugin_get(const char *name)
90 unsigned int i;
91 const struct audio_output_plugin *plugin;
93 audio_output_plugins_for_each(plugin, i)
94 if (strcmp(audio_output_plugins[i]->name, name) == 0)
95 return audio_output_plugins[i];
97 return NULL;
100 void audio_output_plugin_print_all_types(FILE * fp)
102 unsigned i;
103 const struct audio_output_plugin *plugin;
105 audio_output_plugins_for_each(plugin, i)
106 fprintf(fp, "%s ", plugin->name);
108 fprintf(fp, "\n");
109 fflush(fp);