From a91dea00d0b50e759c8a7421346961a2cc27a67b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 9 Oct 2018 16:39:19 +0200 Subject: [PATCH] stream: implement cork and flush Implement cork with _set_active and flush with the new _flush method. --- src/stream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stream.c b/src/stream.c index 0708e617e..3472c46fe 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1383,7 +1383,7 @@ pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, voi s->corked = b; - pw_log_warn("Not Implemented %d", b); + pw_stream_set_active(s->stream, !b); o = pa_operation_new(s->context, s, on_success, sizeof(struct success_ack)); d = o->userdata; d->cb = cb; @@ -1404,7 +1404,8 @@ pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *use PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE); PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE); - pw_log_warn("Not Implemented"); + pw_stream_flush(s->stream, false); + update_timing_info(s); o = pa_operation_new(s->context, s, on_success, sizeof(struct success_ack)); d = o->userdata; d->cb = cb;