[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-test3-28-g7794108

Lennart Poettering gitmailer-noreply at 0pointer.de
Mon Mar 2 07:28:18 PST 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  77514c1c4cfd4154371fb7b745772a02c5932ec2 (commit)

- Log -----------------------------------------------------------------
7794108... Merge commit 'coling/master'
45ae4ab... run make update-ffmpeg
505df22... run make update-sbc
e435241... run update-reserve
4e86a4c... run make update-shave
ea1d429... add update-shave target
c083177... Use pa_assert_se() when the containing code has side effects.
-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                      |    6 ++++
 m4/shave.m4                      |   50 ++++++++++++++++++++-----------------
 shave-libtool.in                 |    2 +-
 shave.in                         |    8 +++++-
 src/modules/bluetooth/ipc.h      |    3 +-
 src/modules/module-combine.c     |    2 +-
 src/modules/module-jack-source.c |    2 +-
 src/modules/reserve.h            |   21 ++++++++-------
 src/pulsecore/ffmpeg/resample2.c |   27 +-------------------
 9 files changed, 57 insertions(+), 64 deletions(-)

-----------------------------------------------------------------------

commit c08317772b9478039b2837f4fe02f9dda4231241
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Mon Mar 2 13:11:29 2009 +0000

    Use pa_assert_se() when the containing code has side effects.
    
    As reported by rantala. Closes #502 and #503

diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 6ed4f14..6e4e927 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -487,7 +487,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
     struct output *o;
 
     pa_sink_input_assert_ref(i);
-    pa_assert(o = i->userdata);
+    pa_assert_se(o = i->userdata);
 
     pa_module_unload_request(o->userdata->module, TRUE);
     output_free(o);
diff --git a/src/modules/module-jack-source.c b/src/modules/module-jack-source.c
index 38b6375..373d56e 100644
--- a/src/modules/module-jack-source.c
+++ b/src/modules/module-jack-source.c
@@ -163,7 +163,7 @@ static int jack_process(jack_nframes_t nframes, void *arg) {
     pa_assert(u);
 
     for (c = 0; c < u->channels; c++)
-        pa_assert(buffer[c] = jack_port_get_buffer(u->port[c], nframes));
+        pa_assert_se(buffer[c] = jack_port_get_buffer(u->port[c], nframes));
 
     /* We interleave the data and pass it on to the other RT thread */
 

commit ea1d429c3b9fd505cf6c2fcecc92e950a1d47f35
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Mar 2 14:28:26 2009 +0100

    add update-shave target

diff --git a/Makefile.am b/Makefile.am
index 8735d31..9a3ca7b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -61,6 +61,12 @@ dist-hook:
 		( git-changelog.perl || echo "git-changelog.perl failed." ) > ${distdir}/ChangeLog 2>&1 ; \
 	fi
 
+update-shave:
+	for i in shave.in shave.m4 shave-libtool.in; do \
+		wget -O $$i http://git.lespiau.name/cgit/shave/blob/\?path=shave/$$i ; \
+	done
+	mv shave.m4 m4/
+
 .PHONY: homepage distcleancheck doxygen
 
 DISTCLEANFILES = \

commit 4e86a4c7599fea5f2104e1f56d87b5d373ccd304
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Mar 2 14:28:43 2009 +0100

    run make update-shave

diff --git a/m4/shave.m4 b/m4/shave.m4
index 44d3908..0c2c9f5 100644
--- a/m4/shave.m4
+++ b/m4/shave.m4
@@ -1,9 +1,12 @@
 dnl Make automake/libtool output more friendly to humans
 dnl
-dnl SHAVE_INIT([shavedir])
+dnl SHAVE_INIT([shavedir],[default_mode])
 dnl
 dnl shavedir: the directory where the shave scripts are, it defaults to
 dnl           $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode.  This parameter
+dnl               controls shave's behaviour when no option has been
+dnl               given to configure.  It defaults to disable.
 dnl
 dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
 dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
@@ -11,19 +14,26 @@ dnl   LIBTOOL, you don't want the configure tests to have these variables
 dnl   re-defined.
 dnl * This macro requires GNU make's -s option.
 
-AC_DEFUN([SHAVE_INIT],
+AC_DEFUN([_SHAVE_ARG_ENABLE],
 [
-  dnl enable/disable shave
   AC_ARG_ENABLE([shave],
-    AS_HELP_STRING([--enable-shave],
-                   [use shave to make the build pretty [[default=no]]]),,
-    [enable_shave=no])
+    AS_HELP_STRING(
+      [--enable-shave],
+      [use shave to make the build pretty [[default=$1]]]),,
+      [enable_shave=$1]
+    )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+  dnl you can tweak the default value of enable_shave
+  m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
 
   if test x"$enable_shave" = xyes; then
     dnl where can we find the shave scripts?
     m4_if([$1],,
-      [shavedir='$(top_builddir)'],
-      [shavedir='$(top_builddir)'/$1])
+      [shavedir="$ac_pwd"],
+      [shavedir="$ac_pwd/$1"])
     AC_SUBST(shavedir)
 
     dnl make is now quiet
@@ -35,19 +45,22 @@ AC_DEFUN([SHAVE_INIT],
 
     dnl substitute libtool
     SHAVE_SAVED_LIBTOOL=$LIBTOOL
-    AC_SUBST(SHAVE_SAVED_LIBTOOL)
-    LIBTOOL="\$(SHELL) \$(shavedir)/shave-libtool '\$(SHAVE_SAVED_LIBTOOL)'"
+    LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
     AC_SUBST(LIBTOOL)
 
     dnl substitute cc/cxx
     SHAVE_SAVED_CC=$CC
     SHAVE_SAVED_CXX=$CXX
-    AC_SUBST(SHAVE_SAVED_CC)
-    AC_SUBST(SHAVE_SAVED_CXX)
-    CC="\$(SHELL) \$(shavedir)/shave cc '\$(SHAVE_SAVED_CC)'"
-    CXX="\$(SHELL) \$(shavedir)/shave cxx '\$(SHAVE_SAVED_CXX)'"
+    SHAVE_SAVED_FC=$FC
+    SHAVE_SAVED_F77=$F77
+    CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+    CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+    FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+    F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
     AC_SUBST(CC)
     AC_SUBST(CXX)
+    AC_SUBST(FC)
+    AC_SUBST(F77)
 
     V=@
   else
@@ -58,12 +71,3 @@ AC_DEFUN([SHAVE_INIT],
   AC_SUBST(Q)
 ])
 
-AC_DEFUN([SHAVE_OUTPUT],
-[
-  if test x"$enable_shave" = xyes; then
-    dnl small workaround to fix libtool itself
-    dnl it's shokingly hard to find a better way, really! wtf...
-    test -f $srcdir/libtool && (tmpfile=`mktemp` && cat $srcdir/libtool | sed "s,^LTCC=.*$,LTCC=\"$SHELL $ac_pwd/shave cc $SHAVE_SAVED_CC\"," > $tmpfile && mv $tmpfile $srcdir/libtool)
-  fi
-
-])
diff --git a/shave-libtool.in b/shave-libtool.in
index 30e6f13..1f3a720 100644
--- a/shave-libtool.in
+++ b/shave-libtool.in
@@ -8,7 +8,7 @@ fi
 
 lt_unmangle ()
 {
-   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_]\*_la-##'`
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
 }
 
 # the real libtool to use
diff --git a/shave.in b/shave.in
index dc46ec9..174641e 100644
--- a/shave.in
+++ b/shave.in
@@ -8,7 +8,7 @@ fi
 
 lt_unmangle ()
 {
-   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_]\*_la-##'`
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
 }
 
 # the tool to wrap (cc, cxx, ar, ranlib, ..)
@@ -50,6 +50,12 @@ link,*)
 *,cc)
     Q="  CC    "
     ;;
+*,fc)
+    Q="  FC    "
+    ;;
+*,f77)
+    Q="  F77   "
+    ;;
 *,*)
     # should not happen
     Q="  CC    "

commit e43524129014d14ffb1d1db1810bf2a2110a06e1
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Mar 2 14:31:52 2009 +0100

    run update-reserve

diff --git a/src/modules/reserve.h b/src/modules/reserve.h
index ceb1ad1..b315a08 100644
--- a/src/modules/reserve.h
+++ b/src/modules/reserve.h
@@ -31,10 +31,11 @@
 typedef struct rd_device rd_device;
 
 /* Prototype for a function that is called whenever someone else wants
- * your app to release the device you having locked. A return value <=
- * 0 denies the request, a positive return value agrees to it. Before
- * returning your application should close the device in question
- * completely to make sure the new application may acceess it. */
+ * your application to release the device it has locked. A return
+ * value <= 0 denies the request, a positive return value agrees to
+ * it. Before returning your application should close the device in
+ * question completely to make sure the new application may access
+ * it. */
 typedef int (*rd_request_cb_t)(
 	rd_device *d,
 	int forced);                  /* Non-zero if an application forcibly took the lock away without asking. If this is the case then the return value of this call is ignored. */
@@ -48,20 +49,20 @@ int rd_acquire(
 	const char *device_name,      /* The device to lock, e.g. "Audio0" */
 	const char *application_name, /* A human readable name of the application, e.g. "PulseAudio Sound Server" */
 	int32_t priority,             /* The priority for this application. If unsure use 0 */
-	rd_request_cb_t request_cb,   /* Will be called whenever someone asks that this device shall be released. May be NULL if priority is INT32_MAX */
+	rd_request_cb_t request_cb,   /* Will be called whenever someone requests that this device shall be released. May be NULL if priority is INT32_MAX */
 	DBusError *error);            /* If we fail due to a D-Bus related issue the error will be filled in here. May be NULL. */
 
-/* Unlock (if needed) and destroy a rd_device object again */
+/* Unlock (if needed) and destroy an rd_device object again */
 void rd_release(rd_device *d);
 
-/* Set the application device name for a rd_device object Returns 0 on
- * success, a negative errno style return value on error. */
+/* Set the application device name for an rd_device object. Returns 0
+ * on success, a negative errno style return value on error. */
 int rd_set_application_device_name(rd_device *d, const char *name);
 
-/* Attach a userdata pointer to a rd_device */
+/* Attach a userdata pointer to an rd_device */
 void rd_set_userdata(rd_device *d, void *userdata);
 
-/* Query the userdata pointer from a rd_device. Returns NULL if no
+/* Query the userdata pointer from an rd_device. Returns NULL if no
  * userdata was set. */
 void* rd_get_userdata(rd_device *d);
 

commit 505df22addf6d449f2c46614ebf2f7e42d12dbdd
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Mar 2 14:32:36 2009 +0100

    run make update-sbc

diff --git a/src/modules/bluetooth/ipc.h b/src/modules/bluetooth/ipc.h
index 4203150..f030acf 100644
--- a/src/modules/bluetooth/ipc.h
+++ b/src/modules/bluetooth/ipc.h
@@ -160,7 +160,8 @@ struct bt_get_capabilities_req {
 
 #define BT_HFP_CODEC_PCM			0x00
 
-#define BT_PCM_FLAG_NREC			1
+#define BT_PCM_FLAG_NREC			0x01
+#define BT_PCM_FLAG_PCM_ROUTING			0x02
 
 typedef struct {
 	uint8_t transport;

commit 45ae4abe2389355b8b84cb1fa1f46038b22e2f9a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Mar 2 14:33:36 2009 +0100

    run make update-ffmpeg

diff --git a/src/pulsecore/ffmpeg/resample2.c b/src/pulsecore/ffmpeg/resample2.c
index ed59448..ac9db73 100644
--- a/src/pulsecore/ffmpeg/resample2.c
+++ b/src/pulsecore/ffmpeg/resample2.c
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file resample2.c
+ * @file libavcodec/resample2.c
  * audio resampling
  * @author Michael Niedermayer <michaelni at gmx.at>
  */
@@ -175,10 +175,6 @@ void av_build_filter(FELEM *filter, double factor, int tap_count, int phase_coun
 #endif
 }
 
-/**
- * Initializes an audio resampler.
- * Note, if either rate is not an integer then simply scale both rates up so they are.
- */
 AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff){
     AVResampleContext *c= av_mallocz(sizeof(AVResampleContext));
     double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
@@ -206,33 +202,12 @@ void av_resample_close(AVResampleContext *c){
     av_freep(&c);
 }
 
-/**
- * Compensates samplerate/timestamp drift. The compensation is done by changing
- * the resampler parameters, so no audible clicks or similar distortions occur
- * @param compensation_distance distance in output samples over which the compensation should be performed
- * @param sample_delta number of output samples which should be output less
- *
- * example: av_resample_compensate(c, 10, 500)
- * here instead of 510 samples only 500 samples would be output
- *
- * note, due to rounding the actual compensation might be slightly different,
- * especially if the compensation_distance is large and the in_rate used during init is small
- */
 void av_resample_compensate(AVResampleContext *c, int sample_delta, int compensation_distance){
 //    sample_delta += (c->ideal_dst_incr - c->dst_incr)*(int64_t)c->compensation_distance / c->ideal_dst_incr;
     c->compensation_distance= compensation_distance;
     c->dst_incr = c->ideal_dst_incr - c->ideal_dst_incr * (int64_t)sample_delta / compensation_distance;
 }
 
-/**
- * resamples.
- * @param src an array of unconsumed samples
- * @param consumed the number of samples of src which have been consumed are returned here
- * @param src_size the number of unconsumed samples available
- * @param dst_size the amount of space in samples available in dst
- * @param update_ctx if this is 0 then the context wont be modified, that way several channels can be resampled with the same context
- * @return the number of samples written in dst or -1 if an error occurred
- */
 int av_resample(AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx){
     int dst_index, i;
     int index= c->index;

commit 7794108d177fd5c7e9485af6061c8188fa31c4e4
Merge: 45ae4ab... c083177...
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Mar 2 16:28:08 2009 +0100

    Merge commit 'coling/master'


-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list