From 3e956ee879446ed488a214dd6e1507c86857ef3d Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 19 Dec 2022 22:48:04 +0700 Subject: [PATCH] safer and cheap to always audioconvert --- xpra/sound/gstreamer_util.py | 4 ++-- xpra/sound/src.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xpra/sound/gstreamer_util.py b/xpra/sound/gstreamer_util.py index 6f13517a7c..80afbfd9be 100755 --- a/xpra/sound/gstreamer_util.py +++ b/xpra/sound/gstreamer_util.py @@ -135,9 +135,9 @@ def force_enabled(codec_name): #these encoders require an "audioconvert" element: -ENCODER_NEEDS_AUDIOCONVERT = ("flacenc", "wavpackenc") +#ENCODER_NEEDS_AUDIOCONVERT = ("flacenc", "wavpackenc") #if this is lightweight enough, maybe we should include it unconditionally? -SOURCE_NEEDS_AUDIOCONVERT = ("directsoundsrc", "osxaudiosrc", "autoaudiosrc", "wasapisrc") +#SOURCE_NEEDS_AUDIOCONVERT = ("directsoundsrc", "osxaudiosrc", "autoaudiosrc", "wasapisrc") CUTTER_NEEDS_RESAMPLE = ("opusenc", ) #those don't work anyway: diff --git a/xpra/sound/src.py b/xpra/sound/src.py index 05493756bb..ed3916ac45 100755 --- a/xpra/sound/src.py +++ b/xpra/sound/src.py @@ -114,8 +114,8 @@ def __init__(self, src_type=None, src_options=None, codecs=(), codec_options=Non f"max-size-time={SOURCE_QUEUE_TIME*MS_TO_NS}", f"leaky={GST_QUEUE_LEAK_DOWNSTREAM}"] pipeline_els += [" ".join(queue_el)] - if encoder in ENCODER_NEEDS_AUDIOCONVERT or src_type in SOURCE_NEEDS_AUDIOCONVERT: - pipeline_els += ["audioconvert"] + #if encoder in ENCODER_NEEDS_AUDIOCONVERT or src_type in SOURCE_NEEDS_AUDIOCONVERT: + pipeline_els += ["audioconvert"] if CUTTER_THRESHOLD>0 and encoder not in ENCODER_CANNOT_USE_CUTTER and not fmt: pipeline_els.append("cutter threshold=%.4f run-length=%i pre-length=%i leaky=false name=cutter" % ( CUTTER_THRESHOLD, CUTTER_RUN_LENGTH*MS_TO_NS, CUTTER_PRE_LENGTH*MS_TO_NS))