Rename completely from polyp to pulse

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 9 years ago
parent cf18d66ac5
commit b4697bcfd6

@ -116,7 +116,7 @@ if( WITH_OSS_SINK )
endif( WITH_OSS_SINK ) endif( WITH_OSS_SINK )
##### check polyp support ####################### ##### check pulse support #######################
if( WITH_PULSE_SINK ) if( WITH_PULSE_SINK )

@ -7,9 +7,9 @@ Take especially note of the following:
- If you wish to install plugins in a non-standard place, you can change the - If you wish to install plugins in a non-standard place, you can change the
AKODE_SEARCHDIR definition in lib/pluginhandler.cpp. AKODE_SEARCHDIR definition in lib/pluginhandler.cpp.
- You SHOULD not install sinks for backends you don't use. Thus jack_sink - You SHOULD not install sinks for backends you don't use. Thus jack_sink
should only be installed when jackd is available, polyp_sink only when should only be installed when jackd is available, pulse_sink only when
the polypaudio server is used and alsa_sink only when using a Linux kernel the PulseAudio server is used and alsa_sink only when using a Linux kernel
with ALSA drivers. with ALSA drivers.
When using direct aKode playback sinks will be autodetected by loading and When using direct aKode playback sinks will be autodetected by loading and
probing plugins in this order: polyp, jack, alsa, oss probing plugins in this order: pulse, jack, alsa, oss

@ -7,9 +7,9 @@ Take especially note of the following:
- If you wish to install plugins in a non-standard place, you can change the - If you wish to install plugins in a non-standard place, you can change the
AKODE_SEARCHDIR definition in lib/pluginhandler.cpp. AKODE_SEARCHDIR definition in lib/pluginhandler.cpp.
- You SHOULD not install sinks for backends you don't use. Thus jack_sink - You SHOULD not install sinks for backends you don't use. Thus jack_sink
should only be installed when jackd is available, polyp_sink only when should only be installed when jackd is available, pulse_sink only when
the polypaudio server is used and alsa_sink only when using a Linux kernel the PulseAudio server is used and alsa_sink only when using a Linux kernel
with ALSA drivers. with ALSA drivers.
When using direct aKode playback sinks will be autodetected by loading and When using direct aKode playback sinks will be autodetected by loading and
probing plugins in this order: polyp, jack, alsa, oss probing plugins in this order: pulse, jack, alsa, oss

@ -270,24 +270,24 @@ AC_SUBST(JACK_LIBADD)
AC_SUBST(JACK_LDFLAGS) AC_SUBST(JACK_LDFLAGS)
fi fi
AC_ARG_WITH(polypaudio,AC_HELP_STRING([--with-polypaudio],[Enable Polypaudio server support @<:@default=check@:>@]),[polypaudio_test="$withval"],[polypaudio_test="yes"]) AC_ARG_WITH(pulseaudio,AC_HELP_STRING([--with-pulseaudio],[Enable PulseAudio server support @<:@default=check@:>@]),[pulseaudio_test="$withval"],[pulseaudio_test="yes"])
if test "x$polypaudio_test" = "xyes" ; then if test "x$pulseaudio_test" = "xyes" ; then
AC_MSG_CHECKING(for Polypaudio 0.7 or later) AC_MSG_CHECKING(for pulseaudio 0.9.2 or later)
if $PKG_CONFIG --atleast-version 0.7 polyplib-simple >/dev/null 2>&1 ; then if $PKG_CONFIG --atleast-version 0.9.2 libpulse-simple >/dev/null 2>&1 ; then
POLYP_CFLAGS="`$PKG_CONFIG --cflags polyplib-simple`" PULSE_CFLAGS="`$PKG_CONFIG --cflags libpulse-simple`"
POLYP_LIBADD="`$PKG_CONFIG --libs-only-l polyplib-simple`" PULSE_LIBADD="`$PKG_CONFIG --libs-only-l libpulse-simple`"
POLYP_LDFLAGS="`$PKG_CONFIG --libs-only-L polyplib-simple`" PULSE_LDFLAGS="`$PKG_CONFIG --libs-only-L libpulse-simple`"
have_polyp=yes have_pulse=yes
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_LIBPOLYP, 1, AC_DEFINE(HAVE_LIBPULSE, 1,
[Define if you have polyplib (required if you want Polypaudio server support)]) [Define if you have libpulse (required if you want PulseAudio server support)])
else else
AC_MSG_RESULT(not installed) AC_MSG_RESULT(not installed)
fi fi
AC_SUBST(POLYP_CFLAGS) AC_SUBST(PULSE_CFLAGS)
AC_SUBST(POLYP_LIBADD) AC_SUBST(PULSE_LIBADD)
AC_SUBST(POLYP_LDFLAGS) AC_SUBST(PULSE_LDFLAGS)
fi fi
AC_ARG_WITH(ffmpeg,AC_HELP_STRING([--with-ffmpeg],[Enable experimental FFMPEG decoder support @<:@default=check@:>@]),[ffmpeg_test="$withval"],[ffmpeg_test="yes"]) AC_ARG_WITH(ffmpeg,AC_HELP_STRING([--with-ffmpeg],[Enable experimental FFMPEG decoder support @<:@default=check@:>@]),[ffmpeg_test="$withval"],[ffmpeg_test="yes"])
@ -482,7 +482,7 @@ AM_CONDITIONAL(include_alsa_sink, test x$have_alsa = xyes)
AM_CONDITIONAL(include_oss_sink, test x$have_oss = xyes) AM_CONDITIONAL(include_oss_sink, test x$have_oss = xyes)
AM_CONDITIONAL(include_sun_sink, test x$have_sun = xyes) AM_CONDITIONAL(include_sun_sink, test x$have_sun = xyes)
AM_CONDITIONAL(include_jack_sink, test x$have_jack = xyes) AM_CONDITIONAL(include_jack_sink, test x$have_jack = xyes)
AM_CONDITIONAL(include_polyp_sink, test x$have_polyp = xyes) AM_CONDITIONAL(include_pulse_sink, test x$have_pulse = xyes)
AM_CONDITIONAL(include_ffmpeg_decoder, test x$have_ffmpeg = xyes) AM_CONDITIONAL(include_ffmpeg_decoder, test x$have_ffmpeg = xyes)
AC_MSG_CHECKING(for compilable aKode) AC_MSG_CHECKING(for compilable aKode)

@ -65,8 +65,8 @@ AutoSink::~AutoSink()
bool AutoSink::open() bool AutoSink::open()
{ {
// Try Polypaudio // Try Polypaudio
if (getenv("POLYP_SERVER")) if (getenv("PULSE_SERVER"))
if (m_data->tryOpen("polyp")) return true; if (m_data->tryOpen("pulse")) return true;
// Try Jack // Try Jack
if (m_data->tryOpen("jack")) return true; if (m_data->tryOpen("jack")) return true;
// Try ALSA // Try ALSA

@ -15,7 +15,7 @@
tde_conditional_add_subdirectory( WITH_ALSA_SINK alsa_sink ) tde_conditional_add_subdirectory( WITH_ALSA_SINK alsa_sink )
tde_conditional_add_subdirectory( WITH_JACK_SINK jack_sink ) tde_conditional_add_subdirectory( WITH_JACK_SINK jack_sink )
tde_conditional_add_subdirectory( WITH_OSS_SINK oss_sink ) tde_conditional_add_subdirectory( WITH_OSS_SINK oss_sink )
tde_conditional_add_subdirectory( WITH_PULSE_SINK polyp_sink ) tde_conditional_add_subdirectory( WITH_PULSE_SINK pulse_sink )
tde_conditional_add_subdirectory( WITH_SUN_SINK sun_sink ) tde_conditional_add_subdirectory( WITH_SUN_SINK sun_sink )
tde_conditional_add_subdirectory( WITH_FFMPEG_DECODER ffmpeg_decoder ) tde_conditional_add_subdirectory( WITH_FFMPEG_DECODER ffmpeg_decoder )

@ -32,12 +32,12 @@ if include_jack_sink
AKODE_JACK_SINK=jack_sink AKODE_JACK_SINK=jack_sink
endif endif
if include_polyp_sink if include_pulse_sink
AKODE_POLYP_SINK=polyp_sink AKODE_PULSE_SINK=pulse_sink
endif endif
SUBDIRS= $(AKODE_MPC_DECODER) $(AKODE_XIPH_DECODER) \ SUBDIRS= $(AKODE_MPC_DECODER) $(AKODE_XIPH_DECODER) \
$(AKODE_MPEG_DECODER) $(AKODE_FFMPEG_DECODER) \ $(AKODE_MPEG_DECODER) $(AKODE_FFMPEG_DECODER) \
$(AKODE_ALSA_SINK) $(AKODE_OSS_SINK) $(AKODE_SUN_SINK) \ $(AKODE_ALSA_SINK) $(AKODE_OSS_SINK) $(AKODE_SUN_SINK) \
$(AKODE_JACK_SINK) $(AKODE_POLYP_SINK) \ $(AKODE_JACK_SINK) $(AKODE_PULSE_SINK) \
$(AKODE_SRC_RESAMPLER) $(AKODE_SRC_RESAMPLER)

@ -1,7 +0,0 @@
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 $(PULSE_LDFLAGS)
libakode_polyp_sink_la_LIBADD = ../../lib/libakode.la $(PULSE_LIBADD)

@ -21,11 +21,11 @@ include_directories(
##### library ################################### ##### library ###################################
set( target libakode_polyp_sink ) set( target libakode_pulse_sink )
tde_add_library( tde_add_library(
${target} MODULE ${target} MODULE
SOURCES polyp_sink.cpp SOURCES pulse_sink.cpp
LINK akode-shared ${PULSE_LIBRARIES} LINK akode-shared ${PULSE_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )

@ -0,0 +1,7 @@
INCLUDES = -I$(top_srcdir)/akode/lib -I$(top_builddir)/akode/lib $(PULSE_CFLAGS) $(all_includes)
lib_LTLIBRARIES = libakode_pulse_sink.la
libakode_pulse_sink_la_SOURCES = pulse_sink.cpp
libakode_pulse_sink_la_LDFLAGS = -module -avoid-version -no-undefined $(PULSE_LDFLAGS)
libakode_pulse_sink_la_LIBADD = ../../lib/libakode.la $(PULSE_LIBADD)

@ -1,4 +1,4 @@
/* aKode: Polyp-Sink /* aKode: Pulse-Sink
Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com> Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
@ -29,15 +29,15 @@
#include "audioframe.h" #include "audioframe.h"
#include "audiobuffer.h" #include "audiobuffer.h"
#include "polyp_sink.h" #include "pulse_sink.h"
#include <iostream> #include <iostream>
namespace aKode { namespace aKode {
extern "C" { PolypSinkPlugin polyp_sink; }; extern "C" { PulseSinkPlugin pulse_sink; };
struct PolypSink::private_data struct PulseSink::private_data
{ {
private_data() : server(0), error(false) {}; private_data() : server(0), error(false) {};
@ -49,7 +49,7 @@ struct PolypSink::private_data
AudioConfiguration config; AudioConfiguration config;
}; };
PolypSink::PolypSink() PulseSink::PulseSink()
{ {
m_data = new private_data; m_data = new private_data;
m_data->sample_spec.rate = 44100; m_data->sample_spec.rate = 44100;
@ -57,7 +57,7 @@ PolypSink::PolypSink()
m_data->sample_spec.format = PA_SAMPLE_S16NE; m_data->sample_spec.format = PA_SAMPLE_S16NE;
} }
bool PolypSink::open() { bool PulseSink::open() {
int error = 0; int error = 0;
m_data->server = pa_simple_new(0, "akode-client", PA_STREAM_PLAYBACK, 0, "", &m_data->sample_spec, 0, 0, &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) { if (!m_data->server || error != 0) {
@ -71,20 +71,20 @@ bool PolypSink::open() {
return true; return true;
} }
void PolypSink::close() { void PulseSink::close() {
if (m_data->server) { if (m_data->server) {
pa_simple_free(m_data->server); pa_simple_free(m_data->server);
m_data->server = 0; m_data->server = 0;
} }
} }
PolypSink::~PolypSink() PulseSink::~PulseSink()
{ {
close(); close();
delete m_data; delete m_data;
} }
int PolypSink::setAudioConfiguration(const AudioConfiguration* config) int PulseSink::setAudioConfiguration(const AudioConfiguration* config)
{ {
if (m_data->error) return -1; if (m_data->error) return -1;
@ -109,12 +109,12 @@ int PolypSink::setAudioConfiguration(const AudioConfiguration* config)
return res; return res;
} }
const AudioConfiguration* PolypSink::audioConfiguration() const const AudioConfiguration* PulseSink::audioConfiguration() const
{ {
return &m_data->config; return &m_data->config;
} }
bool PolypSink::writeFrame(AudioFrame* frame) bool PulseSink::writeFrame(AudioFrame* frame)
{ {
if ( m_data->error ) return false; if ( m_data->error ) return false;

@ -1,4 +1,4 @@
/* aKode: Polyp-Sink /* aKode: Pulse-Sink
Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com> Copyright (C) 2004 Allan Sandfeld Jensen <kde@carewolf.com>
@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#ifndef _AKODE_POLYP_SINK_H #ifndef _AKODE_PULSE_SINK_H
#define _AKODE_POLYP_SINK_H #define _AKODE_PULSE_SINK_H
#include "sink.h" #include "sink.h"
@ -30,10 +30,10 @@ namespace aKode {
class AudioConfiguration; class AudioConfiguration;
class AudioFrame; class AudioFrame;
class PolypSink : public Sink { class PulseSink : public Sink {
public: public:
PolypSink(); PulseSink();
~PolypSink(); ~PulseSink();
bool open(); bool open();
void close(); void close();
int setAudioConfiguration(const AudioConfiguration *config); int setAudioConfiguration(const AudioConfiguration *config);
@ -46,14 +46,14 @@ private:
private_data *m_data; private_data *m_data;
}; };
class PolypSinkPlugin : public SinkPlugin { class PulseSinkPlugin : public SinkPlugin {
public: public:
virtual PolypSink* openSink() { virtual PulseSink* openSink() {
return new PolypSink(); return new PulseSink();
} }
}; };
extern "C" AKODE_EXPORT PolypSinkPlugin polyp_sink; extern "C" AKODE_EXPORT PulseSinkPlugin pulse_sink;
} // namespace } // namespace
Loading…
Cancel
Save