[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-168-ge7a6d53

Lennart Poettering gitmailer-noreply at 0pointer.de
Sun Jun 7 15:12:00 PDT 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  8eaea3aa6471b7d0e78d110752847db5b213c85a (commit)

- Log -----------------------------------------------------------------
e7a6d53 core: replace tabs by spaces
587fc2a core: make sure soft mute status stays in sync with hw mute status
ab5adce rtstutter: increase log level by default
-----------------------------------------------------------------------

Summary of changes:
 src/modules/alsa/alsa-sink.c   |    2 +-
 src/modules/alsa/alsa-source.c |    2 +-
 src/pulsecore/sink.c           |   68 +++++++++++++++++++++-------------------
 src/pulsecore/source.c         |    6 +++-
 src/tests/rtstutter.c          |    2 +
 5 files changed, 45 insertions(+), 35 deletions(-)

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

commit ab5adce7a014f57df829491d06acafbfec3afb5d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Jun 7 23:24:02 2009 +0200

    rtstutter: increase log level by default

diff --git a/src/tests/rtstutter.c b/src/tests/rtstutter.c
index f04d43a..a4b5d59 100644
--- a/src/tests/rtstutter.c
+++ b/src/tests/rtstutter.c
@@ -93,6 +93,8 @@ static void* work(void *p) {
 int main(int argc, char*argv[]) {
     unsigned n;
 
+    pa_log_set_level(PA_LOG_DEBUG);
+
     srand((unsigned) time(NULL));
 
     if (argc >= 3) {

commit 587fc2ab1c7b53ddd28f35e19aad55caa804de1f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 00:02:15 2009 +0200

    core: make sure soft mute status stays in sync with hw mute status
    
    This should close rhbz #494851, mandriva bz #51234.
    
    Probably the same as our own #572, launchpad #352732.

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 98ebac3..59a5ca7 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1199,7 +1199,7 @@ fail:
 
 static void sink_get_mute_cb(pa_sink *s) {
     struct userdata *u = s->userdata;
-    int err, sw;
+    int err, sw = 0;
 
     pa_assert(u);
     pa_assert(u->mixer_elem);
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 277b110..c176309 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1158,7 +1158,7 @@ fail:
 
 static void source_get_mute_cb(pa_source *s) {
     struct userdata *u = s->userdata;
-    int err, sw;
+    int err, sw = 0;
 
     pa_assert(u);
     pa_assert(u->mixer_elem);
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index db9b4f3..5d54d83 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1365,8 +1365,12 @@ pa_bool_t pa_sink_get_mute(pa_sink *s, pa_bool_t force_refresh) {
 
         pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_MUTE, NULL, 0, NULL) == 0);
 
-        if (old_muted != s->muted)
+        if (old_muted != s->muted) {
             pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+
+            /* Make sure the soft mute status stays in sync */
+            pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+        }
     }
 
     return s->muted;
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index abb5f4d..53697c5 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -768,8 +768,12 @@ pa_bool_t pa_source_get_mute(pa_source *s, pa_bool_t force_refresh) {
 
         pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_MUTE, NULL, 0, NULL) == 0);
 
-        if (old_muted != s->muted)
+        if (old_muted != s->muted) {
             pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+
+            /* Make sure the soft mute status stays in sync */
+            pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+        }
     }
 
     return s->muted;

commit e7a6d53118315ff12896707e42528bda5e5d9eab
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 00:12:20 2009 +0200

    core: replace tabs by spaces

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 5d54d83..13f0e11 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -973,21 +973,21 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) {
     n = fill_mix_info(s, &length1st, info, MAX_MIX_CHANNELS);
 
     if (n == 0) {
-	pa_silence_memchunk_get(&s->core->silence_cache,
-				s->core->mempool,
-				result,
-				&s->sample_spec,
-				length1st);
+        pa_silence_memchunk_get(&s->core->silence_cache,
+                                s->core->mempool,
+                                result,
+                                &s->sample_spec,
+                                length1st);
     } else if (n == 1) {
-	pa_cvolume volume;
+        pa_cvolume volume;
 
-	*result = info[0].chunk;
-	pa_memblock_ref(result->memblock);
+        *result = info[0].chunk;
+        pa_memblock_ref(result->memblock);
 
-	if (result->length > length)
-	    result->length = length;
+        if (result->length > length)
+            result->length = length;
 
-	pa_sw_cvolume_multiply(&volume, &s->thread_info.soft_volume, &info[0].volume);
+        pa_sw_cvolume_multiply(&volume, &s->thread_info.soft_volume, &info[0].volume);
 
         if (s->thread_info.soft_muted || !pa_cvolume_is_norm(&volume)) {
             if (s->thread_info.soft_muted || pa_cvolume_is_muted(&volume)) {
@@ -1005,10 +1005,10 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) {
     } else {
         void *ptr;
 
-	result->index = 0;
-	result->memblock = pa_memblock_new(s->core->mempool, length);
+        result->index = 0;
+        result->memblock = pa_memblock_new(s->core->mempool, length);
 
-	ptr = pa_memblock_acquire(result->memblock);
+        ptr = pa_memblock_acquire(result->memblock);
 
         result->length = pa_mix(info, n,
                                 (uint8_t*) ptr + result->index, length1st,
@@ -1022,23 +1022,23 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) {
     inputs_drop(s, info, n, result);
 
     if (result->length < length) {
-	pa_memchunk chunk;
-	size_t l, d;
-	pa_memchunk_make_writable(result, length);
-
-	l = length - result->length;
-	d = result->index + result->length;
-	while (l > 0) {
-	    chunk = *result;
-	    chunk.index = d;
-	    chunk.length = l;
-
-	    pa_sink_render_into(s, &chunk);
-
-	    d += chunk.length;
-	    l -= chunk.length;
-	}
-	result->length = length;
+        pa_memchunk chunk;
+        size_t l, d;
+        pa_memchunk_make_writable(result, length);
+
+        l = length - result->length;
+        d = result->index + result->length;
+        while (l > 0) {
+            chunk = *result;
+            chunk.index = d;
+            chunk.length = l;
+
+            pa_sink_render_into(s, &chunk);
+
+            d += chunk.length;
+            l -= chunk.length;
+        }
+        result->length = length;
     }
 
     pa_sink_unref(s);

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list