[pulseaudio-commits] 5 commits - configure.ac src/Makefile.am src/pulsecore

Arun Raghavan arun at kemper.freedesktop.org
Thu Dec 22 20:26:22 PST 2011


 configure.ac                  |   11 ++++++++++-
 src/Makefile.am               |   39 ++++++++++++++++++++++++++++++---------
 src/pulsecore/core-util.c     |    4 +++-
 src/pulsecore/sink-input.c    |   10 +++++-----
 src/pulsecore/sink.c          |    2 +-
 src/pulsecore/source-output.c |   10 +++++-----
 src/pulsecore/source.c        |    4 ++--
 7 files changed, 56 insertions(+), 24 deletions(-)

New commits:
commit 07e47bc018d5a97d1356a55e7b2651c328d06460
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Thu Dec 8 16:06:50 2011 +0530

    build-sys: Make esound bits optional
    
    This is really quite irrelevant on most modern systems today, and more
    so for embedded systems.

diff --git a/configure.ac b/configure.ac
index 5e9cebc..c16aaa9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -739,6 +739,13 @@ AC_SUBST(HAVE_ALSA)
 AM_CONDITIONAL([HAVE_ALSA], [test "x$HAVE_ALSA" = x1])
 AS_IF([test "x$HAVE_ALSA" = "x1"], AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?]))
 
+#### EsounD support (optional) ####
+
+AC_ARG_ENABLE([esound],
+    AS_HELP_STRING([--disable-esound],[Disable optional EsounD support]))
+AM_CONDITIONAL([HAVE_ESOUND], [test "x$enable_esound" != "xno"])
+AS_IF([test "x$enable_esound" != "xno"], [HAVE_ESOUND=1])
+
 #### Solaris audio support (optional) ####
 
 AC_ARG_ENABLE([solaris],
@@ -1342,7 +1349,8 @@ AS_IF([test "x$HAVE_WEBRTC" = "x1"], ENABLE_WEBRTC=yes, ENABLE_WEBRTC=no)
 AS_IF([test "x$HAVE_TDB" = "x1"], ENABLE_TDB=yes, ENABLE_TDB=no)
 AS_IF([test "x$HAVE_GDBM" = "x1"], ENABLE_GDBM=yes, ENABLE_GDBM=no)
 AS_IF([test "x$HAVE_SIMPLEDB" = "x1"], ENABLE_SIMPLEDB=yes, ENABLE_SIMPLEDB=no)
-AS_IF([test "x$USE_PER_USER_ESOUND_SOCKET" = "x1"], ENABLE_PER_USER_ESOUND_SOCKET=yes, ENABLE_PER_USER_ESOUND_SOCKET=no)
+AS_IF([test "x$HAVE_ESOUND" = "x1"], ENABLE_ESOUND=yes, ENABLE_ESOUND=no)
+AS_IF([test "x$HAVE_ESOUND" = "x1" -a "x$USE_PER_USER_ESOUND_SOCKET" = "x1"], ENABLE_PER_USER_ESOUND_SOCKET=yes, ENABLE_PER_USER_ESOUND_SOCKET=no)
 AS_IF([test "x$enable_legacy_runtime_dir" != "xno"], ENABLE_LEGACY_RUNTIME_DIR=yes, ENABLE_LEGACY_RUNTIME_DIR=no)
 AS_IF([test "x$enable_legacy_database_entry_format" != "xno"], ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=yes, ENABLE_LEGACY_DATABASE_ENTRY_FORMAT=no)
 
@@ -1363,6 +1371,7 @@ echo "
     Enable X11:                    ${ENABLE_X11}
     Enable OSS Output:             ${ENABLE_OSS_OUTPUT}
     Enable OSS Wrapper:            ${ENABLE_OSS_WRAPPER}
+    Enable EsounD:                 ${ENABLE_ESOUND}
     Enable Alsa:                   ${ENABLE_ALSA}
     Enable CoreAudio:              ${ENABLE_COREAUDIO}
     Enable Solaris:                ${ENABLE_SOLARIS}
diff --git a/src/Makefile.am b/src/Makefile.am
index 649f82f..02635fa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -900,8 +900,12 @@ modlibexec_LTLIBRARIES = \
 		libprotocol-cli.la \
 		libprotocol-simple.la \
 		libprotocol-http.la \
-		libprotocol-native.la \
+		libprotocol-native.la
+
+if HAVE_ESOUND
+modlibexec_LTLIBRARIES += \
 		libprotocol-esound.la
+endif
 
 # We need to emulate sendmsg/recvmsg to support this on Win32
 if !OS_IS_WIN32
@@ -939,9 +943,11 @@ libprotocol_native_la_CFLAGS += $(DBUS_CFLAGS)
 libprotocol_native_la_LIBADD += $(DBUS_LIBS)
 endif
 
+if HAVE_ESOUND
 libprotocol_esound_la_SOURCES = pulsecore/protocol-esound.c pulsecore/protocol-esound.h pulsecore/esound.h
 libprotocol_esound_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
 libprotocol_esound_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
+endif
 
 librtp_la_SOURCES = \
 		modules/rtp/rtp.c modules/rtp/rtp.h \
@@ -998,12 +1004,10 @@ modlibexec_LTLIBRARIES += \
 		module-sine.la \
 		module-native-protocol-tcp.la \
 		module-native-protocol-fd.la \
-		module-esound-protocol-tcp.la \
 		module-combine.la \
 		module-combine-sink.la \
 		module-remap-sink.la \
 		module-ladspa-sink.la \
-		module-esound-sink.la \
 		module-tunnel-sink.la \
 		module-tunnel-source.la \
 		module-position-event-sounds.la \
@@ -1016,6 +1020,12 @@ modlibexec_LTLIBRARIES += \
 		module-filter-apply.la \
 		module-filter-heuristics.la
 
+if HAVE_ESOUND
+modlibexec_LTLIBRARIES += \
+		module-esound-protocol-tcp.la \
+		module-esound-sink.la
+endif
+
 # See comment at librtp.la above
 if !OS_IS_WIN32
 modlibexec_LTLIBRARIES += \
@@ -1028,9 +1038,12 @@ modlibexec_LTLIBRARIES += \
 		module-cli-protocol-unix.la \
 		module-simple-protocol-unix.la \
 		module-http-protocol-unix.la \
-		module-native-protocol-unix.la \
+		module-native-protocol-unix.la
+if HAVE_ESOUND
+modlibexec_LTLIBRARIES += \
 		module-esound-protocol-unix.la
 endif
+endif
 
 if HAVE_MKFIFO
 modlibexec_LTLIBRARIES += \
@@ -1039,10 +1052,12 @@ modlibexec_LTLIBRARIES += \
 endif
 
 if !OS_IS_WIN32
+if HAVE_ESOUND
 modlibexec_LTLIBRARIES += \
 		module-esound-compat-spawnfd.la \
 		module-esound-compat-spawnpid.la
 endif
+endif
 
 if HAVE_REGEX
 modlibexec_LTLIBRARIES += \
@@ -1233,8 +1248,6 @@ SYMDEF_FILES = \
 		module-pipe-source-symdef.h \
 		module-simple-protocol-tcp-symdef.h \
 		module-simple-protocol-unix-symdef.h \
-		module-esound-protocol-tcp-symdef.h \
-		module-esound-protocol-unix-symdef.h \
 		module-native-protocol-tcp-symdef.h \
 		module-native-protocol-unix-symdef.h \
 		module-native-protocol-fd-symdef.h \
@@ -1244,15 +1257,12 @@ SYMDEF_FILES = \
 		module-remap-sink-symdef.h \
 		module-ladspa-sink-symdef.h \
 		module-equalizer-sink-symdef.h \
-		module-esound-compat-spawnfd-symdef.h \
-		module-esound-compat-spawnpid-symdef.h \
 		module-match-symdef.h \
 		module-tunnel-sink-symdef.h \
 		module-tunnel-source-symdef.h \
 		module-null-sink-symdef.h \
 		module-null-source-symdef.h \
 		module-sine-source-symdef.h \
-		module-esound-sink-symdef.h \
 		module-zeroconf-publish-symdef.h \
 		module-zeroconf-discover-symdef.h \
 		module-bonjour-publish-symdef.h \
@@ -1310,6 +1320,15 @@ SYMDEF_FILES = \
 		module-filter-apply-symdef.h \
 		module-filter-heuristics-symdef.h
 
+if HAVE_ESOUND
+SYMDEF_FILES += \
+		module-esound-protocol-tcp-symdef.h \
+		module-esound-protocol-unix-symdef.h \
+		module-esound-compat-spawnfd-symdef.h \
+		module-esound-compat-spawnpid-symdef.h \
+		module-esound-sink-symdef.h
+endif
+
 EXTRA_DIST += $(SYMDEF_FILES)
 BUILT_SOURCES += $(SYMDEF_FILES) builddirs
 
@@ -1398,6 +1417,7 @@ module_native_protocol_fd_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la
 
 # EsounD protocol
 
+if HAVE_ESOUND
 module_esound_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
 module_esound_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS)
 module_esound_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS)
@@ -1419,6 +1439,7 @@ module_esound_compat_spawnpid_la_LIBADD = $(MODULE_LIBADD)
 module_esound_sink_la_SOURCES = modules/module-esound-sink.c
 module_esound_sink_la_LDFLAGS = $(MODULE_LDFLAGS) $(WINSOCK_LIBS)
 module_esound_sink_la_LIBADD = $(MODULE_LIBADD)
+endif
 
 # Pipes
 

commit e8e29760cd659a01e26bf513d02a1cd978d0fe91
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 19 12:28:44 2011 +0100

    core: comment typo

diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index f7196cf..ab75b21 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -1481,7 +1481,7 @@ void pa_source_set_volume(
     /* make sure we don't change the volume in PASSTHROUGH mode ...
      * ... *except* if we're being invoked to reset the volume to ensure 0 dB gain */
     if (pa_source_is_passthrough(s) && (!volume || !pa_cvolume_is_norm(volume))) {
-        pa_log_warn("Cannot change volume, Source is monitor of a PASSTHROUGH sink");
+        pa_log_warn("Cannot change volume, source is monitor of a PASSTHROUGH sink");
         return;
     }
 

commit e33aeaa7fb4dc37596bf98f51d5f8d1cb5801079
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 19 12:28:43 2011 +0100

    core: fix typo in logging

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 23b6b4b..93caa8f 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -2072,7 +2072,7 @@ int pa_sink_input_update_rate(pa_sink_input *i) {
 
     i->actual_resample_method = new_resampler ? pa_resampler_get_method(new_resampler) : PA_RESAMPLER_INVALID;
 
-    pa_log_debug("Updated resmpler for sink input %d", i->index);
+    pa_log_debug("Updated resampler for sink input %d", i->index);
 
     return 0;
 }
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 049046a..8a35ab0 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -1664,7 +1664,7 @@ int pa_source_output_update_rate(pa_source_output *o) {
 
     o->actual_resample_method = new_resampler ? pa_resampler_get_method(new_resampler) : PA_RESAMPLER_INVALID;
 
-    pa_log_debug("Updated resmpler for source output %d", o->index);
+    pa_log_debug("Updated resampler for source output %d", o->index);
 
     return 0;
 }

commit 638b0264e09bd68d75a79754c180519fbda86b36
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 19 12:28:42 2011 +0100

    core: sample_spec.rate is in Hz, not kHz; change logging output

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 7db8a4c..23b6b4b 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -376,10 +376,10 @@ int pa_sink_input_new(
 
         pa_log_info("Trying to change sample rate");
         if (pa_sink_update_rate(data->sink, data->sample_spec.rate, pa_sink_input_new_data_is_passthrough(data)) == TRUE)
-            pa_log_info("Rate changed to %u kHz",
+            pa_log_info("Rate changed to %u Hz",
                         data->sink->sample_spec.rate);
         else
-            pa_log_info("Resampling enabled to %u kHz", data->sink->sample_spec.rate);
+            pa_log_info("Resampling enabled to %u Hz", data->sink->sample_spec.rate);
     }
 
     /* Due to the fixing of the sample spec the volume might not match anymore */
@@ -1642,10 +1642,10 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, pa_bool_t save) {
 
         pa_log_info("Trying to change sample rate");
         if (pa_sink_update_rate(dest, i->sample_spec.rate, pa_sink_input_is_passthrough(i)) == TRUE)
-            pa_log_info("Rate changed to %u kHz",
+            pa_log_info("Rate changed to %u Hz",
                         dest->sample_spec.rate);
         else
-            pa_log_info("Resampling enabled to %u kHz",
+            pa_log_info("Resampling enabled to %u Hz",
                         dest->sample_spec.rate);
     }
 
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 9a43a1c..81c6e9d 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1316,7 +1316,7 @@ pa_bool_t pa_sink_update_rate(pa_sink *s, uint32_t rate, pa_bool_t passthrough)
         }
 
         if (PA_SINK_IS_RUNNING(s->state)) {
-            pa_log_info("Cannot update rate, SINK_IS_RUNNING, will keep using %u kHz",
+            pa_log_info("Cannot update rate, SINK_IS_RUNNING, will keep using %u Hz",
                         s->sample_spec.rate);
             return FALSE;
         }
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 7b0cb84..049046a 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -355,10 +355,10 @@ int pa_source_output_new(
 
         pa_log_info("Trying to change sample rate");
         if (pa_source_update_rate(data->source, data->sample_spec.rate, pa_source_output_new_data_is_passthrough(data)) == TRUE)
-            pa_log_info("Rate changed to %u kHz",
+            pa_log_info("Rate changed to %u Hz",
                         data->source->sample_spec.rate);
         else
-            pa_log_info("Resampling enabled to %u kHz", data->source->sample_spec.rate);
+            pa_log_info("Resampling enabled to %u Hz", data->source->sample_spec.rate);
     }
 
     if (data->resample_method == PA_RESAMPLER_INVALID)
@@ -1410,10 +1410,10 @@ int pa_source_output_finish_move(pa_source_output *o, pa_source *dest, pa_bool_t
 
         pa_log_info("Trying to change sample rate");
         if (pa_source_update_rate(dest, o->sample_spec.rate, pa_source_output_is_passthrough(o)) == TRUE)
-            pa_log_info("Rate changed to %u kHz",
+            pa_log_info("Rate changed to %u Hz",
                         dest->sample_spec.rate);
         else
-            pa_log_info("Resampling enabled to %u kHz",
+            pa_log_info("Resampling enabled to %u Hz",
                         dest->sample_spec.rate);
     }
 
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 14e04ed..f7196cf 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -931,7 +931,7 @@ pa_bool_t pa_source_update_rate(pa_source *s, uint32_t rate, pa_bool_t passthrou
         }
 
         if (PA_SOURCE_IS_RUNNING(s->state)) {
-            pa_log_info("Cannot update rate, SOURCE_IS_RUNNING, will keep using %u kHz",
+            pa_log_info("Cannot update rate, SOURCE_IS_RUNNING, will keep using %u Hz",
                         s->sample_spec.rate);
             return FALSE;
         }

commit 49fd49f21f372fd1370d6b2251ca93d197c3f4d3
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 19 12:28:41 2011 +0100

    core: fix potential memory leak

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 0173135..1aa5a9a 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1982,8 +1982,10 @@ static char *get_path(const char *fn, pa_bool_t prependmid, pa_bool_t rt) {
     if (fn) {
         char *r;
 
-        if (pa_is_path_absolute(fn))
+        if (pa_is_path_absolute(fn)) {
+            pa_xfree(rtp);
             return pa_xstrdup(fn);
+        }
 
         if (!rtp)
             return NULL;



More information about the pulseaudio-commits mailing list