]> code.delx.au - pulseaudio/commitdiff
fix x11 build
authorLennart Poettering <lennart@poettering.net>
Tue, 17 Aug 2004 18:53:42 +0000 (18:53 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Aug 2004 18:53:42 +0000 (18:53 +0000)
disable prebuf on drain

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@136 fefdeb5f-60dc-0310-8127-8f9354f1896f

polyp/Makefile.am
polyp/memblockq.c
polyp/memblockq.h
polyp/pacat.c
polyp/protocol-native.c

index 1f982515c438734d098612e8781c88573e641c1e..5a49201abeab65b71f91472d373f4294d0747448 100644 (file)
@@ -272,7 +272,7 @@ if !X_DISPLAY_MISSING
 module_x11_bell_la_SOURCES = module-x11-bell.c
 module_x11_bell_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS)
 module_x11_bell_la_LDFLAGS = -module -avoid-version
-module_x11_bell_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIB)
+module_x11_bell_la_LIBADD = $(AM_LIBADD) $(X_PRE_LIBS) -lX11 $(X_LIBS) $(X_EXTRA_LIB)
 endif
 
 libpolyp_la_SOURCES = polyplib.h \
index 4019c893bed05c2c5151a158c81416942602be5a..8f499df0b0867aeff97c50ce5f5b6c805d80187b 100644 (file)
@@ -323,3 +323,8 @@ uint32_t pa_memblockq_get_minreq(struct pa_memblockq *bq) {
     assert(bq);
     return bq->minreq;
 }
+
+void pa_memblockq_prebuf_disable(struct pa_memblockq *bq) {
+    assert(bq);
+    bq->prebuf = 0;
+}
index e6ad01db8b799af82718bdbe1d4ac6111f2dbc65..40184703e9f690170dcb3fdb7584fb73d3ceb849 100644 (file)
@@ -76,7 +76,10 @@ uint32_t pa_memblockq_get_length(struct pa_memblockq *bq);
 /* Return how many bytes are missing in queue to the specified fill amount */
 uint32_t pa_memblockq_missing(struct pa_memblockq *bq);
 
-
+/* Returns the minimal request value */
 uint32_t pa_memblockq_get_minreq(struct pa_memblockq *bq);
 
+/* Force disabling of pre-buf even when the pre-buffer is not yet filled */
+void pa_memblockq_prebuf_disable(struct pa_memblockq *bq);
+
 #endif
index 4f3bf001680ed31cc2518dbfdbb7a471e2dfbe5e..2c7044b8c77b97417393cb3431202842f6f41357 100644 (file)
@@ -113,16 +113,13 @@ static void stream_state_callback(struct pa_stream *s, void *userdata) {
 
     switch (pa_stream_get_state(s)) {
         case PA_STREAM_CREATING:
+        case PA_STREAM_TERMINATED:
             break;
 
         case PA_STREAM_READY:
             fprintf(stderr, "Stream successfully created\n");
             break;
             
-        case PA_STREAM_TERMINATED:
-            quit(0);
-            break;
-            
         case PA_STREAM_FAILED:
         default:
             fprintf(stderr, "Stream errror: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
index 1fafc9844f154533d0c25f94ded2c0958f51594d..e86c78f00be5c1408b5c378850b8d0d325b4425b 100644 (file)
@@ -748,12 +748,16 @@ static void command_drain_playback_stream(struct pa_pdispatch *pd, uint32_t comm
     }
 
     s->drain_request = 0;
+
+    pa_memblockq_prebuf_disable(s->memblockq);
     
     if (!pa_memblockq_is_readable(s->memblockq))
         pa_pstream_send_simple_ack(c->pstream, tag);
     else {
         s->drain_request = 1;
         s->drain_tag = tag;
+
+        pa_sink_notify(s->sink_input->sink);
     }
 }