mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
fix x11 build
disable prebuf on drain git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@136 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
2d6d3e5c47
commit
81822a7519
5 changed files with 15 additions and 6 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))));
|
||||
|
|
|
|||
|
|
@ -749,11 +749,15 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue