diff options
author | Steven O'Brien <steven_obrien1@yahoo.co.uk> | 2013-12-15 16:52:21 +0000 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-19 23:25:50 +0100 |
commit | 35f85ddd860a819dbdebed1124f572719b28ef0b (patch) | |
tree | 7ec692ec60f78df495bbe9ce09dfd5aa22f0c8c6 /src/InputRegistry.cxx | |
parent | e30fa7d15e71b9109f4f44c0b388e88b001031af (diff) | |
download | mpd-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/InputRegistry.cxx')
-rw-r--r-- | src/InputRegistry.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/InputRegistry.cxx b/src/InputRegistry.cxx index aa6c06ed1..ef4acb237 100644 --- a/src/InputRegistry.cxx +++ b/src/InputRegistry.cxx @@ -22,6 +22,10 @@ #include "util/Macros.hxx" #include "input/FileInputPlugin.hxx" +#ifdef HAVE_ALSA +#include "input/AlsaInputPlugin.hxx" +#endif + #ifdef ENABLE_ARCHIVE #include "input/ArchiveInputPlugin.hxx" #endif @@ -48,6 +52,9 @@ const InputPlugin *const input_plugins[] = { &input_plugin_file, +#ifdef HAVE_ALSA + &input_plugin_alsa, +#endif #ifdef ENABLE_ARCHIVE &input_plugin_archive, #endif |