From 50f76c87305cbc662c1f0c21ac05d0443861652a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 7 Sep 2022 13:02:55 +0200 Subject: [PATCH] pulse-server: implement TRIGGER and PREBUF methods Start and stop prebuf. --- src/modules/module-protocol-pulse/pulse-server.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 23fc99abd..b403aba21 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -2727,11 +2727,17 @@ static int do_flush_trigger_prebuf_stream(struct client *client, uint32_t comman break; case COMMAND_TRIGGER_PLAYBACK_STREAM: case COMMAND_PREBUF_PLAYBACK_STREAM: + if (stream->type != STREAM_TYPE_PLAYBACK) + return -ENOENT; + if (command == COMMAND_TRIGGER_PLAYBACK_STREAM) + stream->in_prebuf = false; + else if (stream->attr.prebuf > 0) + stream->in_prebuf = true; + stream_send_request(stream); break; default: return -EINVAL; } - return reply_simple_ack(client, tag); }