Add pulseaudio support

[taken from Fedora patches]
pull/1/head
François Andriot 9 years ago committed by Slávek Banko
parent 386d5647da
commit cf18d66ac5

@ -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 )

@ -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 #########################

@ -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 )

@ -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}
)

@ -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)

@ -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();

@ -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

Loading…
Cancel
Save