aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/AlsaInputPlugin.hxx
diff options
context:
space:
mode:
authorSteven O'Brien <steven_obrien1@yahoo.co.uk>2013-12-15 16:52:21 +0000
committerMax Kellermann <max@duempel.org>2013-12-19 23:25:50 +0100
commit35f85ddd860a819dbdebed1124f572719b28ef0b (patch)
tree7ec692ec60f78df495bbe9ce09dfd5aa22f0c8c6 /src/input/AlsaInputPlugin.hxx
parente30fa7d15e71b9109f4f44c0b388e88b001031af (diff)
downloadmpd-35f85ddd860a819dbdebed1124f572719b28ef0b.tar.gz
mpd-35f85ddd860a819dbdebed1124f572719b28ef0b.tar.xz
mpd-35f85ddd860a819dbdebed1124f572719b28ef0b.zip
add draft ALSA input plugin
I've created an elementary input plugin that plays sound from the soundcard, so you can use MPD to listen to anything connected to the line-in jack, or to Video4Linux FM radio cards that send audio through the soundcard. There has been a small number of posts here in the past requesting line-in input, so here is a first, simplistic stab at it. The patch adds a new sheme, alsa://, which causes mpd to play data read directly from a souncdard. It defaults to hw:0,0, but you can pass any ALSA device name in the URI. So, using mpc for example: mpc add alsa:// mpc play will play from device hw:0,0. To use a diffferent device: mpc add alsa://hw:1,0
Diffstat (limited to 'src/input/AlsaInputPlugin.hxx')
-rw-r--r--src/input/AlsaInputPlugin.hxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/input/AlsaInputPlugin.hxx b/src/input/AlsaInputPlugin.hxx
new file mode 100644
index 000000000..ac9519588
--- /dev/null
+++ b/src/input/AlsaInputPlugin.hxx
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * 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.
+ *
+ * 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.
+ */
+
+#ifndef MPD_ALSA_INPUT_PLUGIN_HXX
+#define MPD_ALSA_INPUT_PLUGIN_HXX
+
+#include "InputPlugin.hxx"
+
+extern const struct InputPlugin input_plugin_alsa;
+
+
+#endif