Commit 5ce93d6f authored by Max Kellermann's avatar Max Kellermann

output/sndio: refuse to build with libroarsndio

RoarAudio's sndio emulation has been a source for annoyances. First, their headers turned out to be broken with C++, due to their use of the "new" keyword. Then they used a preprocessor macro to rename "sio_hdl" to something else, effectively disallowing the use of forward declarations. Enough is enough, and I'm removing support for it. RoarAudio users should better use the RoarAudio output plugin.
parent 20a5ef27
...@@ -8,6 +8,7 @@ ver 0.21 (not yet released) ...@@ -8,6 +8,7 @@ ver 0.21 (not yet released)
- pcm: support audio/L24 (RFC 3190) - pcm: support audio/L24 (RFC 3190)
* output * output
- alsa: non-blocking mode - alsa: non-blocking mode
- sndio: remove support for the broken RoarAudio sndio emulation
* mixer * mixer
- sndio: new mixer plugin - sndio: new mixer plugin
......
...@@ -1131,10 +1131,26 @@ MPD_DEFINE_CONDITIONAL(enable_fifo, HAVE_FIFO, ...@@ -1131,10 +1131,26 @@ MPD_DEFINE_CONDITIONAL(enable_fifo, HAVE_FIFO,
[support for writing audio to a FIFO]) [support for writing audio to a FIFO])
dnl ----------------------------------- SNDIO ---------------------------------- dnl ----------------------------------- SNDIO ----------------------------------
MPD_ENABLE_AUTO_HEADER([sndio], [SNDIO], [sndio.h], MPD_ARG_ENABLE([sndio], [SNDIO], [sndio output plugin], [], [
[-lsndio], [], AC_SUBST([SNDIO_LIBS], [])
[sndio output plugin], AC_SUBST([SNDIO_CFLAGS], [])
[libsndio not found])
found_sndio=no
MPD_AUTO([sndio], [SNDIO], [sndio output plugin],
[AC_CHECK_HEADER([sndio.h],
[AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([
#include <sndio.h>
#ifdef ROAR_VERSION
#error libroarsndio not supported
#endif
])],
[found_sndio=yes SNDIO_LIBS='-lsndio' SNDIO_CFLAGS=''],
[AC_MSG_WARN([Found libroarsndio, which is known to be broken; ignoring it.])],
)]
)]
)
])
dnl ----------------------------------- Haiku --------------------------------- dnl ----------------------------------- Haiku ---------------------------------
MPD_ENABLE_AUTO_HEADER([haiku], [HAIKU], [media/MediaDefs.h], MPD_ENABLE_AUTO_HEADER([haiku], [HAIKU], [media/MediaDefs.h],
......
...@@ -24,16 +24,8 @@ ...@@ -24,16 +24,8 @@
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "Log.hxx" #include "Log.hxx"
/* work around a C++ incompatibility if the sndio API is emulated by
libroar: libroar's "struct roar_service_stream" has a member named
"new", which is an illegal identifier in C++ */
#define new new_
#include <sndio.h> #include <sndio.h>
/* undo the libroar workaround */
#undef new
#include <stdexcept> #include <stdexcept>
#ifndef SIO_DEVANY #ifndef SIO_DEVANY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment