From: Klemens Nanni Subject: x11/freerdp: default /sound to sndio To: ports@openbsd.org Date: Fri, 2 Feb 2024 06:13:12 +0000 'xfreerdp /sound ...' and more importantly remmina configurations with the GUI knob set to local sound will both use the "fake" backend by default. 'xfreerdp /sound:sys:sndio ...' and "sys:sndio" added as parameter in remmina fix sound, but that takes a little digging (remmina's GUi tooltip does not mention sndio). As per xfreerdp(1): /sound[:[sys:sys,][dev:dev,][format:format,][rate:rate,][channel:channel,][latency:latency,][quality:quality]], /audio[:[sys:sys,][dev:dev,][format:format,][rate:rate,][channel:channel,][latency:latency,][quality:quality]] Audio output (sound) The patch only defaults to sndio if exactly "/sound" was used, i.e. any "/sound:..." invocation has the same effect as before. I'm new to RDP from OpenBSD and thought sndio would be a saner default. Feedback? Objection? OK? Index: Makefile =================================================================== RCS file: /cvs/ports/x11/freerdp/Makefile,v diff -u -p -r1.67 Makefile --- Makefile 27 Sep 2023 20:37:05 -0000 1.67 +++ Makefile 2 Feb 2024 05:07:24 -0000 @@ -2,6 +2,7 @@ COMMENT = client for Microsoft RDP (rem DISTNAME = freerdp-2.11.2 DPB_PROPERTIES = parallel CATEGORIES = x11 net +REVISION = 0 SHARED_LIBS += freerdp-client2 1.1 SHARED_LIBS += freerdp2 3.0 Index: patches/patch-channels_rdpsnd_client_rdpsnd_main_c =================================================================== RCS file: patches/patch-channels_rdpsnd_client_rdpsnd_main_c diff -N patches/patch-channels_rdpsnd_client_rdpsnd_main_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-channels_rdpsnd_client_rdpsnd_main_c 2 Feb 2024 05:57:05 -0000 @@ -0,0 +1,15 @@ +Default /sound (without parameters) to :sys:sndio + +Index: channels/rdpsnd/client/rdpsnd_main.c +--- channels/rdpsnd/client/rdpsnd_main.c.orig ++++ channels/rdpsnd/client/rdpsnd_main.c +@@ -966,7 +966,8 @@ static UINT rdpsnd_process_addin_args(rdpsndPlugin* rd + } + CommandLineSwitchEnd(arg) + } while ((arg = CommandLineFindNextArgumentA(arg)) != NULL); +- } ++ } else ++ rdpsnd_set_subsystem(rdpsnd, "sndio"); /* default to sndio(7) not fake backend */ + + return CHANNEL_RC_OK; + }