OutputList.cxx 2.52 KB
Newer Older
1
/*
2
 * Copyright (C) 2003-2013 The Music Player Daemon Project
3
 * http://www.musicpd.org
4 5 6 7 8 9 10 11 12 13
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
14 15 16 17
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 19
 */

20
#include "config.h"
21
#include "OutputList.hxx"
22
#include "OutputAPI.hxx"
23
#include "output/AlsaOutputPlugin.hxx"
24
#include "output/AoOutputPlugin.hxx"
25
#include "output/FifoOutputPlugin.hxx"
26
#include "output/HttpdOutputPlugin.hxx"
27
#include "output/JackOutputPlugin.hxx"
28
#include "output/NullOutputPlugin.hxx"
29
#include "output/OpenALOutputPlugin.hxx"
30
#include "output/OssOutputPlugin.hxx"
31
#include "output/OSXOutputPlugin.hxx"
32
#include "output/PipeOutputPlugin.hxx"
33
#include "output/PulseOutputPlugin.hxx"
34
#include "output/RecorderOutputPlugin.hxx"
35
#include "output/RoarOutputPlugin.hxx"
36
#include "output/ShoutOutputPlugin.hxx"
37
#include "output/SolarisOutputPlugin.hxx"
38
#include "output/WinmmOutputPlugin.hxx"
39

Max Kellermann's avatar
Max Kellermann committed
40 41
#include <string.h>

42
const struct audio_output_plugin *const audio_output_plugins[] = {
43
#ifdef HAVE_SHOUT
44
	&shout_output_plugin,
45
#endif
Max Kellermann's avatar
Max Kellermann committed
46
	&null_output_plugin,
47
#ifdef HAVE_FIFO
Max Kellermann's avatar
Max Kellermann committed
48
	&fifo_output_plugin,
49
#endif
50 51 52
#ifdef ENABLE_PIPE_OUTPUT
	&pipe_output_plugin,
#endif
53
#ifdef HAVE_ALSA
54
	&alsa_output_plugin,
55
#endif
56 57 58
#ifdef HAVE_ROAR
	&roar_output_plugin,
#endif
59
#ifdef HAVE_AO
Max Kellermann's avatar
Max Kellermann committed
60
	&ao_output_plugin,
61 62
#endif
#ifdef HAVE_OSS
Max Kellermann's avatar
Max Kellermann committed
63
	&oss_output_plugin,
64
#endif
Serge Ziryukin's avatar
Serge Ziryukin committed
65 66 67
#ifdef HAVE_OPENAL
	&openal_output_plugin,
#endif
68
#ifdef HAVE_OSX
69
	&osx_output_plugin,
70
#endif
71 72 73
#ifdef ENABLE_SOLARIS_OUTPUT
	&solaris_output_plugin,
#endif
74
#ifdef HAVE_PULSE
75
	&pulse_output_plugin,
76 77
#endif
#ifdef HAVE_JACK
78
	&jack_output_plugin,
79 80 81
#endif
#ifdef ENABLE_HTTPD_OUTPUT
	&httpd_output_plugin,
82 83 84
#endif
#ifdef ENABLE_RECORDER_OUTPUT
	&recorder_output_plugin,
85
#endif
86 87
#ifdef ENABLE_WINMM_OUTPUT
	&winmm_output_plugin,
88
#endif
89 90 91 92 93 94
	NULL
};

const struct audio_output_plugin *
audio_output_plugin_get(const char *name)
{
95
	audio_output_plugins_for_each(plugin)
96 97
		if (strcmp(plugin->name, name) == 0)
			return plugin;
98 99 100

	return NULL;
}