summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrançois Andriot <francois.andriot@free.fr>2015-10-15 04:42:48 +0200
committerSlávek Banko <slavek.banko@axis.cz>2015-10-15 04:43:49 +0200
commitcf18d66ac5c3904f3f932848f761ec5d103a470c (patch)
tree3e240ef577e25f7547322734a60452dbe92ffa53
parent386d5647da414c477f7f045c2850bfb1854e2302 (diff)
downloadakode-cf18d66a.tar.gz
akode-cf18d66a.zip
Add pulseaudio support
[taken from Fedora patches]
-rw-r--r--CMakeLists.txt2
-rw-r--r--ConfigureChecks.cmake12
-rw-r--r--akode/plugins/CMakeLists.txt2
-rw-r--r--akode/plugins/polyp_sink/CMakeLists.txt4
-rw-r--r--akode/plugins/polyp_sink/Makefile.am6
-rw-r--r--akode/plugins/polyp_sink/polyp_sink.cpp4
-rw-r--r--config.h.in4
7 files changed, 17 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8e2d94..df5b7ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,7 +49,7 @@ OPTION( WITH_LIBLTDL "Build with libltdl" ${WITH_ALL_OPTIONS} )
OPTION( WITH_ALSA_SINK "Build with alsa sink" ${WITH_ALL_OPTIONS} )
OPTION( WITH_JACK_SINK "Build with jack sink" ${WITH_ALL_OPTIONS} )
-OPTION( WITH_POLYP_SINK "Build with polyp sink" OFF )
+OPTION( WITH_PULSE_SINK "Build with pulseaudio sink" OFF )
OPTION( WITH_OSS_SINK "Build with oss sink" ${WITH_ALL_OPTIONS} )
OPTION( WITH_SUN_SINK "Build with sun sink" OFF )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index df4d86a..635db2e 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -118,15 +118,15 @@ endif( WITH_OSS_SINK )
##### check polyp support #######################
-if( WITH_POLYP_SINK )
+if( WITH_PULSE_SINK )
- pkg_search_module( POLYP polyplib-simple>=0.70 )
+ pkg_search_module( PULSE libpulse-simple>=0.9.2 )
- if( NOT POLYP_FOUND )
- tde_message_fatal( "polyplib-simple >= 0.70 are required, but not found on your system" )
- endif( NOT POLYP_FOUND )
+ if( NOT PULSE_FOUND )
+ tde_message_fatal( "libpulse-simple >= 0.9.2 are required, but not found on your system" )
+ endif( NOT PULSE_FOUND )
-endif( WITH_POLYP_SINK )
+endif( WITH_PULSE_SINK )
##### check sun support #########################
diff --git a/akode/plugins/CMakeLists.txt b/akode/plugins/CMakeLists.txt
index ce0f3a4..6e11f1a 100644
--- a/akode/plugins/CMakeLists.txt
+++ b/akode/plugins/CMakeLists.txt
@@ -15,7 +15,7 @@
tde_conditional_add_subdirectory( WITH_ALSA_SINK alsa_sink )
tde_conditional_add_subdirectory( WITH_JACK_SINK jack_sink )
tde_conditional_add_subdirectory( WITH_OSS_SINK oss_sink )
-tde_conditional_add_subdirectory( WITH_POLYP_SINK polyp_sink )
+tde_conditional_add_subdirectory( WITH_PULSE_SINK polyp_sink )
tde_conditional_add_subdirectory( WITH_SUN_SINK sun_sink )
tde_conditional_add_subdirectory( WITH_FFMPEG_DECODER ffmpeg_decoder )
diff --git a/akode/plugins/polyp_sink/CMakeLists.txt b/akode/plugins/polyp_sink/CMakeLists.txt
index 90c4f3c..28a940e 100644
--- a/akode/plugins/polyp_sink/CMakeLists.txt
+++ b/akode/plugins/polyp_sink/CMakeLists.txt
@@ -15,7 +15,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/akode/lib
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
- ${POLYP_INCLUDE_DIRS}
+ ${PULSE_INCLUDE_DIRS}
)
@@ -26,7 +26,7 @@ set( target libakode_polyp_sink )
tde_add_library(
${target} MODULE
SOURCES polyp_sink.cpp
- LINK akode-shared ${POLYP_LIBRARIES}
+ LINK akode-shared ${PULSE_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
diff --git a/akode/plugins/polyp_sink/Makefile.am b/akode/plugins/polyp_sink/Makefile.am
index b67602a..a58b04c 100644
--- a/akode/plugins/polyp_sink/Makefile.am
+++ b/akode/plugins/polyp_sink/Makefile.am
@@ -1,7 +1,7 @@
-INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(POLYP_CFLAGS) $(all_includes)
+INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(PULSE_CFLAGS) $(all_includes)
lib_LTLIBRARIES = libakode_polyp_sink.la
libakode_polyp_sink_la_SOURCES = polyp_sink.cpp
-libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(POLYP_LDFLAGS)
-libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(POLYP_LIBADD)
+libakode_polyp_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(PULSE_LDFLAGS)
+libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(PULSE_LIBADD)
diff --git a/akode/plugins/polyp_sink/polyp_sink.cpp b/akode/plugins/polyp_sink/polyp_sink.cpp
index 9376dac..b48b63e 100644
--- a/akode/plugins/polyp_sink/polyp_sink.cpp
+++ b/akode/plugins/polyp_sink/polyp_sink.cpp
@@ -25,7 +25,7 @@
#elif defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#endif
-#include <polyp/polyplib-simple.h>
+#include <pulse/simple.h>
#include "audioframe.h"
#include "audiobuffer.h"
@@ -59,7 +59,7 @@ PolypSink::PolypSink()
bool PolypSink::open() {
int error = 0;
- m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 255, &error );
+ m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 0, &error );
if (!m_data->server || error != 0) {
m_data->error = true;
close();
diff --git a/config.h.in b/config.h.in
index 7fe6faf..eed77f8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -43,9 +43,9 @@
/* Define if you have libOggFLAC (required for loading OggFLAC files) */
#undef HAVE_LIBOGGFLAC
-/* Define if you have polyplib (required if you want Polypaudio server
+/* Define if you have libpulse (required if you want PulseAudio server
support) */
-#undef HAVE_LIBPOLYP
+#undef HAVE_LIBPULSE
/* defined if you have libsamplerate library and header */
#undef HAVE_LIBSAMPLERATE