From 4163991a970fa2d5ddc397e4cbcd974f1ecb5c90 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 23 Feb 2023 08:56:25 +0100 Subject: [PATCH] pulse-server: use pulse.fix.* keys Use a different key than the usual one to select an audio format when we are fixating a stream format to avoid confusion. So pulse.fix.rate, pulse.fix.format, pulse.fix.channels are now used to force a specific format when the stream has the FIX_ stream flags. --- src/modules/module-protocol-pulse/pulse-server.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 174952fbf..0d2b5c49b 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1699,19 +1699,19 @@ static int do_create_playback_stream(struct client *client, uint32_t command, ui rate = ss.rate; if (fix_format) { - if ((str = pw_properties_get(props, SPA_KEY_AUDIO_FORMAT)) != NULL) + if ((str = pw_properties_get(props, "pulse.fix.format")) != NULL) sfix.format = format_name2id(str); else sfix.format = SPA_AUDIO_FORMAT_UNKNOWN; } if (fix_rate) { - if ((str = pw_properties_get(props, SPA_KEY_AUDIO_RATE)) != NULL) + if ((str = pw_properties_get(props, "pulse.fix.rate")) != NULL) sfix.rate = atoi(str); else sfix.rate = 0; } if (fix_channels) { - if ((str = pw_properties_get(props, SPA_KEY_AUDIO_CHANNELS)) != NULL) + if ((str = pw_properties_get(props, "pulse.fix.channels")) != NULL) sfix.channels = atoi(str); else sfix.channels = 0; @@ -1962,19 +1962,19 @@ static int do_create_record_stream(struct client *client, uint32_t command, uint rate = ss.rate; if (fix_format) { - if ((str = pw_properties_get(props, SPA_KEY_AUDIO_FORMAT)) != NULL) + if ((str = pw_properties_get(props, "pulse.fix.format")) != NULL) sfix.format = format_name2id(str); else sfix.format = SPA_AUDIO_FORMAT_UNKNOWN; } if (fix_rate) { - if ((str = pw_properties_get(props, SPA_KEY_AUDIO_RATE)) != NULL) + if ((str = pw_properties_get(props, "pulse.fix.rate")) != NULL) sfix.rate = atoi(str); else sfix.rate = 0; } if (fix_channels) { - if ((str = pw_properties_get(props, SPA_KEY_AUDIO_CHANNELS)) != NULL) + if ((str = pw_properties_get(props, "pulse.fix.channels")) != NULL) sfix.channels = atoi(str); else sfix.channels = 0;