[pulseaudio-commits] r1509 - in /branches/lennart/src/pulsecore: sink.c source.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jul 12 17:10:00 PDT 2007


Author: lennart
Date: Fri Jul 13 02:09:59 2007
New Revision: 1509

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1509&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Make pa_sink_render_* and pa_source_post work only when in RUNNING state, t=
o fix handling of monitor sources when their sink is suspended

Modified:
    branches/lennart/src/pulsecore/sink.c
    branches/lennart/src/pulsecore/source.c

Modified: branches/lennart/src/pulsecore/sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
sink.c?rev=3D1509&root=3Dpulseaudio&r1=3D1508&r2=3D1509&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/sink.c (original)
+++ branches/lennart/src/pulsecore/sink.c Fri Jul 13 02:09:59 2007
@@ -361,7 +361,7 @@
 =

     pa_sink_ref(s);
 =

-    n =3D fill_mix_info(s, info, MAX_MIX_CHANNELS);
+    n =3D s->thread_info.state =3D=3D PA_SINK_RUNNING ? fill_mix_info(s, i=
nfo, MAX_MIX_CHANNELS) : 0;
 =

     if (n =3D=3D 0) {
 =

@@ -426,7 +426,7 @@
 =

     pa_sink_ref(s);
 =

-    n =3D fill_mix_info(s, info, MAX_MIX_CHANNELS);
+    n =3D s->thread_info.state =3D=3D PA_SINK_RUNNING ? fill_mix_info(s, i=
nfo, MAX_MIX_CHANNELS) : 0;
 =

     if (n =3D=3D 0) {
         pa_silence_memchunk(target, &s->sample_spec);

Modified: branches/lennart/src/pulsecore/source.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
source.c?rev=3D1509&root=3Dpulseaudio&r1=3D1508&r2=3D1509&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/source.c (original)
+++ branches/lennart/src/pulsecore/source.c Fri Jul 13 02:09:59 2007
@@ -232,6 +232,9 @@
     pa_source_assert_ref(s);
     pa_assert(chunk);
 =

+    if (s->thread_info.state !=3D PA_SOURCE_RUNNING)
+        return;
+    =

     if (s->thread_info.soft_muted || !pa_cvolume_is_norm(&s->thread_info.s=
oft_volume)) {
         pa_memchunk vchunk =3D *chunk;
 =





More information about the pulseaudio-commits mailing list