summaryrefslogtreecommitdiffstats
path: root/freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff')
-rw-r--r--freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff134
1 files changed, 134 insertions, 0 deletions
diff --git a/freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff b/freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff
new file mode 100644
index 000000000..4cc158086
--- /dev/null
+++ b/freebsd/dependencies/akode/files/patch-b01-add-pulseaudio-support.diff
@@ -0,0 +1,134 @@
+commit cf18d66ac5c3904f3f932848f761ec5d103a470c
+Author: François Andriot <francois.andriot@free.fr>
+Date: Thu Oct 15 04:42:48 2015 +0200
+
+ Add pulseaudio support
+ [taken from Fedora patches]
+
+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