[pulseaudio-commits] r2380 - in /branches/glitch-free/src: modules/module-ladspa-sink.c modules/module-remap-sink.c pulsecore/protocol-native.c pulsecore/sound-file-stream.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue May 6 18:38:17 PDT 2008


Author: lennart
Date: Wed May  7 03:38:16 2008
New Revision: 2380

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2380&root=pulseaudio&view=rev
Log:
update to new rewinding logic

Modified:
    branches/glitch-free/src/modules/module-ladspa-sink.c
    branches/glitch-free/src/modules/module-remap-sink.c
    branches/glitch-free/src/pulsecore/protocol-native.c
    branches/glitch-free/src/pulsecore/sound-file-stream.c

Modified: branches/glitch-free/src/modules/module-ladspa-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/modules/module-ladspa-sink.c?rev=2380&root=pulseaudio&r1=2379&r2=2380&view=diff
==============================================================================
--- branches/glitch-free/src/modules/module-ladspa-sink.c (original)
+++ branches/glitch-free/src/modules/module-ladspa-sink.c Wed May  7 03:38:16 2008
@@ -146,10 +146,7 @@
     pa_assert_se(u = s->userdata);
 
     /* Just hand this one over to the master sink */
-    pa_sink_input_request_rewind(
-            u->sink_input,
-            s->thread_info.rewind_nbytes + pa_memblockq_get_length(u->memblockq),
-            FALSE, FALSE);
+    pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes + pa_memblockq_get_length(u->memblockq), TRUE, FALSE);
 }
 
 /* Called from I/O thread context */
@@ -334,7 +331,7 @@
     if (PA_SINK_INPUT_IS_LINKED(state) &&
         i->thread_info.state == PA_SINK_INPUT_INIT) {
         pa_log_debug("Requesting rewind due to state change.");
-        pa_sink_input_request_rewind(i, 0, TRUE, TRUE);
+        pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
     }
 }
 

Modified: branches/glitch-free/src/modules/module-remap-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/modules/module-remap-sink.c?rev=2380&root=pulseaudio&r1=2379&r2=2380&view=diff
==============================================================================
--- branches/glitch-free/src/modules/module-remap-sink.c (original)
+++ branches/glitch-free/src/modules/module-remap-sink.c Wed May  7 03:38:16 2008
@@ -119,10 +119,7 @@
     pa_sink_assert_ref(s);
     pa_assert_se(u = s->userdata);
 
-    pa_sink_input_request_rewind(
-            u->sink_input,
-            s->thread_info.rewind_nbytes,
-            FALSE, FALSE);
+    pa_sink_input_request_rewind(u->sink_input, s->thread_info.rewind_nbytes, TRUE, FALSE);
 }
 
 /* Called from I/O thread context */
@@ -251,7 +248,7 @@
     if (PA_SINK_INPUT_IS_LINKED(state) &&
         i->thread_info.state == PA_SINK_INPUT_INIT) {
         pa_log_debug("Requesting rewind due to state change.");
-        pa_sink_input_request_rewind(i, 0, TRUE, TRUE);
+        pa_sink_input_request_rewind(i, 0, FALSE, TRUE);
     }
 }
 

Modified: branches/glitch-free/src/pulsecore/protocol-native.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/protocol-native.c?rev=2380&root=pulseaudio&r1=2379&r2=2380&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/protocol-native.c (original)
+++ branches/glitch-free/src/pulsecore/protocol-native.c Wed May  7 03:38:16 2008
@@ -1116,7 +1116,7 @@
             pa_log_debug("Requesting rewind due to end of underrun.");
             pa_sink_input_request_rewind(s->sink_input,
                                          s->sink_input->thread_info.underrun_for == (size_t) -1 ? 0 : s->sink_input->thread_info.underrun_for,
-                                         TRUE, TRUE);
+                                         FALSE, TRUE);
         }
 
     } else {
@@ -1129,7 +1129,7 @@
              * let's have it usk us again */
 
             pa_log_debug("Requesting rewind due to rewrite.");
-            pa_sink_input_request_rewind(s->sink_input, indexr - indexw, FALSE, FALSE);
+            pa_sink_input_request_rewind(s->sink_input, indexr - indexw, TRUE, FALSE);
         }
     }
 

Modified: branches/glitch-free/src/pulsecore/sound-file-stream.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/glitch-free/src/pulsecore/sound-file-stream.c?rev=2380&root=pulseaudio&r1=2379&r2=2380&view=diff
==============================================================================
--- branches/glitch-free/src/pulsecore/sound-file-stream.c (original)
+++ branches/glitch-free/src/pulsecore/sound-file-stream.c Wed May  7 03:38:16 2008
@@ -3,7 +3,7 @@
 /***
   This file is part of PulseAudio.
 
-  Copyright 2004-2006 Lennart Poettering
+  Copyright 2004-2008 Lennart Poettering
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
@@ -245,7 +245,6 @@
     pa_sample_spec ss;
     pa_sink_input_new_data data;
     int fd;
-    pa_memchunk silence;
 
     pa_assert(sink);
     pa_assert(fname);
@@ -347,9 +346,7 @@
     u->sink_input->state_change = sink_input_state_change_cb;
     u->sink_input->userdata = u;
 
-    pa_sink_input_get_silence(u->sink_input, &silence);
-    u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&u->sink_input->sample_spec), 1, 1, 0, &silence);
-    pa_memblock_unref(silence.memblock);
+    u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
 
     pa_sink_input_put(u->sink_input);
 




More information about the pulseaudio-commits mailing list