[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-379-gf6f957b

Lennart Poettering gitmailer-noreply at 0pointer.de
Sun Feb 21 08:41:38 PST 2010


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  2c631dfe9a57950ae971cbeda14e1ee634348424 (commit)

- Log -----------------------------------------------------------------
f6f957b Revert "pacat: Don't use any buffer attr if we don't set any latency/process time params"
-----------------------------------------------------------------------

Summary of changes:
 src/utils/pacat.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

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

commit f6f957b53cc8ed945364ef5d51546f59a4c653be
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Feb 21 17:40:44 2010 +0100

    Revert "pacat: Don't use any buffer attr if we don't set any latency/process time params"
    
    This reverts commit ff2091b2c47dfa7d9f1397627b72d9366b60f566.

diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 68280e5..1036af6 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -409,7 +409,6 @@ static void context_state_callback(pa_context *c, void *userdata) {
 
         case PA_CONTEXT_READY: {
             pa_buffer_attr buffer_attr;
-            const pa_buffer_attr *active_buffer_attr = NULL;
 
             pa_assert(c);
             pa_assert(!stream);
@@ -439,33 +438,29 @@ static void context_state_callback(pa_context *c, void *userdata) {
 
             if (latency_msec > 0) {
                 buffer_attr.fragsize = buffer_attr.tlength = pa_usec_to_bytes(latency_msec * PA_USEC_PER_MSEC, &sample_spec);
-                active_buffer_attr = &buffer_attr;
                 flags |= PA_STREAM_ADJUST_LATENCY;
             } else if (latency > 0) {
                 buffer_attr.fragsize = buffer_attr.tlength = (uint32_t) latency;
-                active_buffer_attr = &buffer_attr;
                 flags |= PA_STREAM_ADJUST_LATENCY;
             } else
                 buffer_attr.fragsize = buffer_attr.tlength = (uint32_t) -1;
 
             if (process_time_msec > 0) {
                 buffer_attr.minreq = pa_usec_to_bytes(process_time_msec * PA_USEC_PER_MSEC, &sample_spec);
-                active_buffer_attr = &buffer_attr;
-            } else if (process_time > 0) {
+            } else if (process_time > 0)
                 buffer_attr.minreq = (uint32_t) process_time;
-                active_buffer_attr = &buffer_attr;
-            } else
+            else
                 buffer_attr.minreq = (uint32_t) -1;
 
             if (mode == PLAYBACK) {
                 pa_cvolume cv;
-                if (pa_stream_connect_playback(stream, device, active_buffer_attr, flags, volume_is_set ? pa_cvolume_set(&cv, sample_spec.channels, volume) : NULL, NULL) < 0) {
+                if (pa_stream_connect_playback(stream, device, &buffer_attr, flags, volume_is_set ? pa_cvolume_set(&cv, sample_spec.channels, volume) : NULL, NULL) < 0) {
                     pa_log(_("pa_stream_connect_playback() failed: %s"), pa_strerror(pa_context_errno(c)));
                     goto fail;
                 }
 
             } else {
-                if (pa_stream_connect_record(stream, device, active_buffer_attr, flags) < 0) {
+                if (pa_stream_connect_record(stream, device, latency > 0 ? &buffer_attr : NULL, flags) < 0) {
                     pa_log(_("pa_stream_connect_record() failed: %s"), pa_strerror(pa_context_errno(c)));
                     goto fail;
                 }

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list