[pulseaudio-commits] Branch 'next' - 4 commits - configure.ac src/Makefile.am src/modules src/pulsecore src/tests
Arun Raghavan
arun at kemper.freedesktop.org
Tue Apr 16 03:58:28 PDT 2013
configure.ac | 10 +----
src/Makefile.am | 4 +-
src/modules/alsa/alsa-mixer.c | 2 -
src/modules/module-equalizer-sink.c | 66 ++++++++++++++++++------------------
src/pulsecore/core-util.c | 4 --
src/pulsecore/core-util.h | 9 ----
src/tests/alsa-mixer-path-test.c | 2 -
7 files changed, 41 insertions(+), 56 deletions(-)
New commits:
commit ac5c4e4e367a4e95a2799e398d0d806a0b533b32
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Tue Apr 16 11:38:23 2013 +0530
equalizer: Fix compiler warning due use of 'signal'
Changing uses of the symbol 'signal' as it redefines the signal-handling
libc function of the same name.
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index 2698279..da4dd77 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -167,7 +167,7 @@ static void fix_filter(float *H, size_t fft_size){
H[i] /= fft_size;
}
-static void interpolate(float *signal, size_t length, uint32_t *xs, float *ys, size_t n_points){
+static void interpolate(float *samples, size_t length, uint32_t *xs, float *ys, size_t n_points){
/* Note that xs must be monotonically increasing! */
float x_range_lower, x_range_upper, c0;
@@ -189,12 +189,12 @@ static void interpolate(float *signal, size_t length, uint32_t *xs, float *ys, s
c0 = (x-x_range_lower) / (x_range_upper-x_range_lower);
pa_assert(c0 >= 0 && c0 <= 1.0);
- signal[x] = ((1.0f - c0) * ys[x_range_lower_i] + c0 * ys[x_range_lower_i + 1]);
+ samples[x] = ((1.0f - c0) * ys[x_range_lower_i] + c0 * ys[x_range_lower_i + 1]);
while(x >= xs[x_range_lower_i + 1])
x_range_lower_i++;
}
- signal[length-1] = ys[n_points-1];
+ samples[length-1] = ys[n_points-1];
}
static pa_bool_t is_monotonic(const uint32_t *xs, size_t length) {
@@ -1581,7 +1581,7 @@ static pa_dbus_interface_info equalizer_info={
void dbus_init(struct userdata *u){
uint32_t dummy;
- DBusMessage *signal = NULL;
+ DBusMessage *message = NULL;
pa_idxset *sink_list = NULL;
u->dbus_protocol=pa_dbus_protocol_get(u->sink->core);
u->dbus_path=pa_sprintf_malloc("/org/pulseaudio/core1/sink%d", u->sink->index);
@@ -1602,21 +1602,21 @@ void dbus_init(struct userdata *u){
}
pa_idxset_put(sink_list, u, &dummy);
- pa_assert_se((signal = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_SINK_ADDED].name)));
- dbus_message_append_args(signal, DBUS_TYPE_OBJECT_PATH, &u->dbus_path, DBUS_TYPE_INVALID);
- pa_dbus_protocol_send_signal(u->dbus_protocol, signal);
- dbus_message_unref(signal);
+ pa_assert_se((message = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_SINK_ADDED].name)));
+ dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &u->dbus_path, DBUS_TYPE_INVALID);
+ pa_dbus_protocol_send_signal(u->dbus_protocol, message);
+ dbus_message_unref(message);
}
void dbus_done(struct userdata *u){
pa_idxset *sink_list;
uint32_t dummy;
- DBusMessage *signal = NULL;
- pa_assert_se((signal = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_SINK_REMOVED].name)));
- dbus_message_append_args(signal, DBUS_TYPE_OBJECT_PATH, &u->dbus_path, DBUS_TYPE_INVALID);
- pa_dbus_protocol_send_signal(u->dbus_protocol, signal);
- dbus_message_unref(signal);
+ DBusMessage *message = NULL;
+ pa_assert_se((message = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_SINK_REMOVED].name)));
+ dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &u->dbus_path, DBUS_TYPE_INVALID);
+ pa_dbus_protocol_send_signal(u->dbus_protocol, message);
+ dbus_message_unref(message);
pa_assert_se(sink_list=pa_shared_get(u->sink->core,SINKLIST));
pa_idxset_remove_by_data(sink_list,u,&dummy);
@@ -1636,7 +1636,7 @@ void dbus_done(struct userdata *u){
void manager_handle_remove_profile(DBusConnection *conn, DBusMessage *msg, void *_u) {
DBusError error;
pa_core *c = (pa_core *)_u;
- DBusMessage *signal = NULL;
+ DBusMessage *message = NULL;
pa_dbus_protocol *dbus_protocol;
char *name;
pa_assert(conn);
@@ -1653,11 +1653,11 @@ void manager_handle_remove_profile(DBusConnection *conn, DBusMessage *msg, void
remove_profile(c,name);
pa_dbus_send_empty_reply(conn, msg);
- pa_assert_se((signal = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_PROFILES_CHANGED].name)));
+ pa_assert_se((message = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_PROFILES_CHANGED].name)));
dbus_protocol = pa_dbus_protocol_get(c);
- pa_dbus_protocol_send_signal(dbus_protocol, signal);
+ pa_dbus_protocol_send_signal(dbus_protocol, message);
pa_dbus_protocol_unref(dbus_protocol);
- dbus_message_unref(signal);
+ dbus_message_unref(message);
}
void manager_get_revision(DBusConnection *conn, DBusMessage *msg, void *_u){
@@ -1785,7 +1785,7 @@ void manager_get_all(DBusConnection *conn, DBusMessage *msg, void *_u){
void equalizer_handle_seed_filter(DBusConnection *conn, DBusMessage *msg, void *_u) {
struct userdata *u = _u;
DBusError error;
- DBusMessage *signal = NULL;
+ DBusMessage *message = NULL;
float *ys;
uint32_t *xs, channel, r_channel;
double *_ys, preamp;
@@ -1859,9 +1859,9 @@ void equalizer_handle_seed_filter(DBusConnection *conn, DBusMessage *msg, void *
pa_dbus_send_empty_reply(conn, msg);
- pa_assert_se((signal = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name)));
- pa_dbus_protocol_send_signal(u->dbus_protocol, signal);
- dbus_message_unref(signal);
+ pa_assert_se((message = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name)));
+ pa_dbus_protocol_send_signal(u->dbus_protocol, message);
+ dbus_message_unref(message);
}
void equalizer_handle_get_filter_points(DBusConnection *conn, DBusMessage *msg, void *_u) {
@@ -2012,7 +2012,7 @@ void equalizer_handle_set_filter(DBusConnection *conn, DBusMessage *msg, void *_
double *H, preamp;
uint32_t channel;
unsigned _n_coefs;
- DBusMessage *signal = NULL;
+ DBusMessage *message = NULL;
DBusError error;
pa_assert_se(u = (struct userdata *) _u);
pa_assert(conn);
@@ -2041,16 +2041,16 @@ void equalizer_handle_set_filter(DBusConnection *conn, DBusMessage *msg, void *_
pa_dbus_send_empty_reply(conn, msg);
- pa_assert_se((signal = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name)));
- pa_dbus_protocol_send_signal(u->dbus_protocol, signal);
- dbus_message_unref(signal);
+ pa_assert_se((message = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name)));
+ pa_dbus_protocol_send_signal(u->dbus_protocol, message);
+ dbus_message_unref(message);
}
void equalizer_handle_save_profile(DBusConnection *conn, DBusMessage *msg, void *_u) {
struct userdata *u = (struct userdata *) _u;
char *name;
uint32_t channel, r_channel;
- DBusMessage *signal = NULL;
+ DBusMessage *message = NULL;
DBusError error;
pa_assert(conn);
pa_assert(msg);
@@ -2074,9 +2074,9 @@ void equalizer_handle_save_profile(DBusConnection *conn, DBusMessage *msg, void
save_profile(u, r_channel, name);
pa_dbus_send_empty_reply(conn, msg);
- pa_assert_se((signal = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_PROFILES_CHANGED].name)));
- pa_dbus_protocol_send_signal(u->dbus_protocol, signal);
- dbus_message_unref(signal);
+ pa_assert_se((message = dbus_message_new_signal(MANAGER_PATH, MANAGER_IFACE, manager_signals[MANAGER_SIGNAL_PROFILES_CHANGED].name)));
+ pa_dbus_protocol_send_signal(u->dbus_protocol, message);
+ dbus_message_unref(message);
}
void equalizer_handle_load_profile(DBusConnection *conn, DBusMessage *msg, void *_u) {
@@ -2085,7 +2085,7 @@ void equalizer_handle_load_profile(DBusConnection *conn, DBusMessage *msg, void
DBusError error;
uint32_t channel, r_channel;
const char *err_msg = NULL;
- DBusMessage *signal = NULL;
+ DBusMessage *message = NULL;
pa_assert(conn);
pa_assert(msg);
@@ -2120,9 +2120,9 @@ void equalizer_handle_load_profile(DBusConnection *conn, DBusMessage *msg, void
}
pa_dbus_send_empty_reply(conn, msg);
- pa_assert_se((signal = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name)));
- pa_dbus_protocol_send_signal(u->dbus_protocol, signal);
- dbus_message_unref(signal);
+ pa_assert_se((message = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name)));
+ pa_dbus_protocol_send_signal(u->dbus_protocol, message);
+ dbus_message_unref(message);
}
void equalizer_handle_save_state(DBusConnection *conn, DBusMessage *msg, void *_u) {
commit df645cfccb4c970dccc0b8d86bbaebfac1104c07
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Mon Apr 15 23:33:13 2013 +0530
build-sys: Bump sonames
libpulse-simple changed this time as well (addition of hole-handling).
diff --git a/configure.ac b/configure.ac
index 9125470..13ca8a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,15 +44,11 @@ AC_SUBST(PA_PROTOCOL_VERSION, 28)
# The stable ABI for client applications, for the version info x:y:z
# always will hold y=z
-AC_SUBST(LIBPULSE_VERSION_INFO, [15:3:15])
+AC_SUBST(LIBPULSE_VERSION_INFO, [16:0:16])
# A simplified, synchronous, ABI-stable interface for client
# applications, for the version info x:y:z always will hold y=z
-AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:3:0])
-
-# The ABI-stable network browsing interface for client applications,
-# for the version info x:y:z always will hold y=z
-AC_SUBST(LIBPULSE_BROWSE_VERSION_INFO, [1:1:1])
+AC_SUBST(LIBPULSE_SIMPLE_VERSION_INFO, [0:4:0])
# The ABI-stable GLib adapter for client applications, for the version
# info x:y:z always will hold y=z
commit c9648ecca41bf7d36a75334251ee31bcaa7d185f
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Sun Apr 14 11:24:41 2013 +0530
alsa: Fix mixer path when running from build tree
The mixer paths are not available in ${builddir} - we need to look in
${srcdir}. This should fix running an in-tree build without make install
as well as alsa-mixer-path-test in make distcheck.
Since the most straightforward way to define PA_SRCDIR was in
Makefile.am, I'm moving PA_BUILDDIR there as well for consistency.
diff --git a/configure.ac b/configure.ac
index b9411e5..9125470 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1242,8 +1242,6 @@ AC_SUBST(PA_SOEXT, [.so])
AC_SUBST(pulseconfdir, ["${sysconfdir}/pulse"])
AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR, pulseconfdir, [Location of configuration files])
-AC_DEFINE_UNQUOTED(PA_BUILDDIR, "${ac_pwd}/src", [Location of uninstalled binaries])
-
#### Mac OSX specific stuff #####
AC_ARG_ENABLE(mac-universal,
diff --git a/src/Makefile.am b/src/Makefile.am
index 4b3efa3..a621a30 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,7 +48,9 @@ AM_CPPFLAGS = \
-DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
AM_CFLAGS = \
- $(PTHREAD_CFLAGS)
+ $(PTHREAD_CFLAGS) \
+ -DPA_SRCDIR=\"$(abs_srcdir)\" \
+ -DPA_BUILDDIR=\"$(abs_builddir)\"
AM_CXXFLAGS = $(AM_CFLAGS)
SERVER_CFLAGS = -D__INCLUDED_FROM_PULSE_AUDIO
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 4ebce39..9a428f4 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -2380,7 +2380,7 @@ static int path_verify(pa_alsa_path *p) {
static const char *get_default_paths_dir(void) {
if (pa_run_from_build_tree())
- return PA_BUILDDIR "/modules/alsa/mixer/paths/";
+ return PA_SRCDIR "/modules/alsa/mixer/paths/";
else
return PA_ALSA_PATHS_DIR;
}
diff --git a/src/tests/alsa-mixer-path-test.c b/src/tests/alsa-mixer-path-test.c
index 1ad06ee..f2bc4cb 100644
--- a/src/tests/alsa-mixer-path-test.c
+++ b/src/tests/alsa-mixer-path-test.c
@@ -16,7 +16,7 @@
/* This function was copied from alsa-mixer.c */
static const char *get_default_paths_dir(void) {
if (pa_run_from_build_tree())
- return PA_BUILDDIR "/modules/alsa/mixer/paths/";
+ return PA_SRCDIR "/modules/alsa/mixer/paths/";
else
return PA_ALSA_PATHS_DIR;
}
commit 8905ec03fba33d071b094a7a5553caa3bd470ae7
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Sun Apr 14 10:32:26 2013 +0530
pulsecore: Don't conditionally inline pa_run_from_build_tree()
There's no good reason to assume an in-tree build will be debug-only.
This breaks alsa-mixer-path-test on make distcheck, for example.
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 4fa4944..cca66bc 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -3209,8 +3209,6 @@ void pa_reset_personality(void) {
}
-#if defined(__linux__) && !defined(__OPTIMIZE__)
-
pa_bool_t pa_run_from_build_tree(void) {
char *rp;
pa_bool_t b = FALSE;
@@ -3223,8 +3221,6 @@ pa_bool_t pa_run_from_build_tree(void) {
return b;
}
-#endif
-
const char *pa_get_temp_dir(void) {
const char *t;
diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h
index 9d59383..15e6809 100644
--- a/src/pulsecore/core-util.h
+++ b/src/pulsecore/core-util.h
@@ -260,14 +260,7 @@ size_t pa_pipe_buf(int fd);
void pa_reset_personality(void);
-/* We abuse __OPTIMIZE__ as a check whether we are a debug build
- * or not. If we are and are run from the build tree then we
- * override the search path to point to our build tree */
-#if defined(__linux__) && !defined(__OPTIMIZE__)
-pa_bool_t pa_run_from_build_tree(void);
-#else
-static inline pa_bool_t pa_run_from_build_tree(void) {return FALSE;}
-#endif
+pa_bool_t pa_run_from_build_tree(void) PA_GCC_CONST;
const char *pa_get_temp_dir(void);
More information about the pulseaudio-commits
mailing list