pulse: improve stream suspended state handling

Only send out SUSPENDED event when there is a change in the suspended
state. This avoids sending out unsuspend events when we simply uncork.

Implement the fail_on_suspend flag for capture and playback streams.
Instead of suspending those streams, we need to kill them.
This commit is contained in:
Wim Taymans 2025-09-01 12:55:51 +02:00
parent 0310bb5c5c
commit 370d190572
3 changed files with 20 additions and 6 deletions

View file

@ -321,8 +321,8 @@ int stream_send_suspended(struct stream *stream, bool suspended)
struct message *reply;
uint32_t command;
pw_log_debug("client %p [%s]: stream %p SUSPENDED channel:%u",
client, client->name, stream, stream->channel);
pw_log_debug("client %p [%s]: stream %p SUSPENDED %d channel:%u",
client, client->name, stream, suspended, stream->channel);
command = stream->direction == PW_DIRECTION_OUTPUT ?
COMMAND_PLAYBACK_STREAM_SUSPENDED :