[polypaudio-commits] r849 - /trunk/src/polypcore/protocol-esound.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu May 11 15:37:44 PDT 2006
Author: lennart
Date: Fri May 12 00:37:42 2006
New Revision: 849
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=849&root=polypaudio&view=rev
Log:
fix hangup detection for recording streams
Modified:
trunk/src/polypcore/protocol-esound.c
Modified: trunk/src/polypcore/protocol-esound.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/protocol-esound.c?rev=849&root=polypaudio&r1=848&r2=849&view=diff
==============================================================================
--- trunk/src/polypcore/protocol-esound.c (original)
+++ trunk/src/polypcore/protocol-esound.c Fri May 12 00:37:42 2006
@@ -58,7 +58,7 @@
#define DEFAULT_COOKIE_FILE ".esd_auth"
-#define PLAYBACK_BUFFER_SECONDS (.5)
+#define PLAYBACK_BUFFER_SECONDS (.25)
#define PLAYBACK_BUFFER_FRAGMENTS (10)
#define RECORD_BUFFER_SECONDS (5)
#define RECORD_BUFFER_FRAGMENTS (100)
@@ -985,7 +985,12 @@
if (pa_iochannel_is_readable(c->io)) {
if (do_read(c) < 0)
goto fail;
- } else if (pa_iochannel_is_hungup(c->io))
+ }
+
+ if (c->state == ESD_STREAMING_DATA && c->source_output && pa_iochannel_is_hungup(c->io))
+ /* In case we are in capture mode we will never call read()
+ * on the socket, hence we need to detect the hangup manually
+ * here, instead of simply waiting for read() to return 0. */
goto fail;
if (pa_iochannel_is_writable(c->io))
@@ -1008,13 +1013,10 @@
connection_free(c);
}
-
static void io_callback(pa_iochannel*io, void *userdata) {
struct connection *c = userdata;
assert(io && c && c->io == io);
-/* pa_log("IO"); */
-
do_work(c);
}
More information about the pulseaudio-commits
mailing list