[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-test8-32-ga4cea4e

Lennart Poettering gitmailer-noreply at 0pointer.de
Mon Apr 13 16:07:28 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  a6541550fde2354196d4e6811ed812fb4a49419d (commit)

- Log -----------------------------------------------------------------
a4cea4e core: when applying delay memblockq take monitored sink latency into account
2d94c93 pacat: add missing newline
4ee4a55 core: use pa_{source|sink}_get_latency_within_thread() at one more place
16324fc sort LINGUAS
-----------------------------------------------------------------------

Summary of changes:
 po/LINGUAS                    |    2 +-
 src/pulsecore/sink-input.c    |    5 +----
 src/pulsecore/source-output.c |   24 ++++++++++++++++++++----
 src/utils/pacat.c             |    2 +-
 4 files changed, 23 insertions(+), 10 deletions(-)

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

commit 16324fc7be0f915a75ec5622dcaecbbc3e9e6d41
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Apr 13 23:41:05 2009 +0200

    sort LINGUAS

diff --git a/po/LINGUAS b/po/LINGUAS
index b97f64c..819fcc7 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -16,8 +16,8 @@ or
 pa
 pl
 pt_BR
-sr at latin
 sr
+sr at latin
 sv
 ta
 te

commit 4ee4a5561767fb96b2e98b9daa79efa58e357595
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:03:10 2009 +0200

    core: use pa_{source|sink}_get_latency_within_thread() at one more place

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 65f1fd5..0229918 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1362,12 +1362,9 @@ int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t
 
         case PA_SINK_INPUT_MESSAGE_GET_LATENCY: {
             pa_usec_t *r = userdata;
-            pa_usec_t sink_usec = 0;
 
             r[0] += pa_bytes_to_usec(pa_memblockq_get_length(i->thread_info.render_memblockq), &i->sink->sample_spec);
-
-            if (i->sink->parent.process_msg(PA_MSGOBJECT(i->sink), PA_SINK_MESSAGE_GET_LATENCY, &sink_usec, 0, NULL) >= 0)
-                r[1] += sink_usec;
+            r[1] += pa_sink_get_latency_within_thread(i->sink);
 
             return 0;
         }
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 3ee2673..cc0ebe6 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -850,12 +850,9 @@ int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int
 
         case PA_SOURCE_OUTPUT_MESSAGE_GET_LATENCY: {
             pa_usec_t *r = userdata;
-            pa_usec_t source_usec = 0;
 
             r[0] += pa_bytes_to_usec(pa_memblockq_get_length(o->thread_info.delay_memblockq), &o->source->sample_spec);
-
-            if (o->source->parent.process_msg(PA_MSGOBJECT(o->source), PA_SOURCE_MESSAGE_GET_LATENCY, &source_usec, 0, NULL) >= 0)
-                r[1] += source_usec;
+            r[1] += pa_source_get_latency_within_thread(o->source);
 
             return 0;
         }

commit 2d94c939575e979132191b59a55d89ed34fa51ed
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:03:34 2009 +0200

    pacat: add missing newline

diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 180de48..15e842f 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -796,7 +796,7 @@ int main(int argc, char *argv[]) {
 
     /* Connect the context */
     if (pa_context_connect(context, server, 0, NULL) < 0) {
-        fprintf(stderr, _("pa_context_connect() failed: %s"), pa_strerror(pa_context_errno(context)));
+        fprintf(stderr, _("pa_context_connect() failed: %s\n"), pa_strerror(pa_context_errno(context)));
         goto quit;
     }
 

commit a4cea4e469d3baf27890820eba030b7acdf63daa
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Apr 14 01:04:17 2009 +0200

    core: when applying delay memblockq take monitored sink latency into account

diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index cc0ebe6..4ba25ae 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -440,6 +440,25 @@ void pa_source_output_push(pa_source_output *o, const pa_memchunk *chunk) {
 
     limit = o->process_rewind ? 0 : o->source->thread_info.max_rewind;
 
+    if (limit > 0 && o->source->monitor_of) {
+        pa_usec_t latency;
+        size_t n;
+
+        /* Hmm, check the latency for knowing how much of the buffered
+         * data is actually still unplayed and might hence still
+         * change. This is suboptimal. Ideally we'd have a call like
+         * pa_sink_get_changeable_size() or so that tells us how much
+         * of the queued data is actually still changeable. Hence
+         * FIXME! */
+
+        latency = pa_sink_get_latency_within_thread(o->source->monitor_of);
+
+        n = pa_usec_to_bytes(latency, &o->source->sample_spec);
+
+        if (n < limit)
+            limit = n;
+    }
+
     /* Implement the delay queue */
     while ((length = pa_memblockq_get_length(o->thread_info.delay_memblockq)) > limit) {
         pa_memchunk qchunk;

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list