[pulseaudio-commits] r1546 - /branches/lennart/src/pulsecore/sound-file-stream.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jul 26 07:40:18 PDT 2007


Author: lennart
Date: Thu Jul 26 16:40:17 2007
New Revision: 1546

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1546&root=3Dpulseaudio&vi=
ew=3Drev
Log:
remove debug messages; don't queue request messages like nothing when send =
file is finished

Modified:
    branches/lennart/src/pulsecore/sound-file-stream.c

Modified: branches/lennart/src/pulsecore/sound-file-stream.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
sound-file-stream.c?rev=3D1546&root=3Dpulseaudio&r1=3D1545&r2=3D1546&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/sound-file-stream.c (original)
+++ branches/lennart/src/pulsecore/sound-file-stream.c Thu Jul 26 16:40:17 =
2007
@@ -62,8 +62,6 @@
     file_stream *u =3D FILE_STREAM(o);
     pa_assert(u);
 =

-    pa_log("xxxx ffreee");
-    =

     if (u->memchunk.memblock)
         pa_memblock_unref(u->memchunk.memblock);
 =

@@ -76,11 +74,9 @@
 static void file_stream_drop(file_stream *u) {
     file_stream_assert_ref(u);
 =

-    pa_log("xxxx drop");
-    =

-    =

     if (u->sink_input) {
         pa_sink_input_disconnect(u->sink_input);
+
         pa_sink_input_unref(u->sink_input);
         u->sink_input =3D NULL;
 =

@@ -116,6 +112,9 @@
     u =3D FILE_STREAM(i->userdata);
     file_stream_assert_ref(u);
 =

+    if (!u->sndfile)
+        return -1;
+    =

     for (;;) {
         =

         if (!u->memchunk.memblock) {
@@ -132,11 +131,6 @@
                 n =3D u->readf_function(u->sndfile, p, BUF_SIZE/fs);
                 pa_memblock_release(u->memchunk.memblock);
 =

-                pa_log("%u/%u =3D data: %02x %02x %02x %02x %02x %02x %02x=
 %02x",
-                       (unsigned int) n, BUF_SIZE/fs,
-                       ((uint8_t*)p)[0], ((uint8_t*)p)[1], ((uint8_t*)p)[2=
], ((uint8_t*)p)[3],
-                       ((uint8_t*)p)[4], ((uint8_t*)p)[5], ((uint8_t*)p)[6=
], ((uint8_t*)p)[7]);
-                =

                 if (n <=3D 0)
                     n =3D 0;
                 =

@@ -161,6 +155,10 @@
                 pa_memchunk_reset(&u->memchunk);
                 =

                 pa_asyncmsgq_post(u->core->asyncmsgq, PA_MSGOBJECT(u), MES=
SAGE_DROP_FILE_STREAM, NULL, NULL, NULL);
+
+                sf_close(u->sndfile);
+                u->sndfile =3D NULL;
+                =

                 return -1;
             }
         }
@@ -293,7 +291,7 @@
 =

     /* The reference to u is dangling here, because we want to keep
      * this stream around until it is fully played. */
-
+    =

     return 0;
 =

 fail:




More information about the pulseaudio-commits mailing list