Commit 6d37df12 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

removed loudness adjustment in postprocessing if there is concatenation

parent ecb41a64
Loading
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@ def get_processing_chain(

    # get pre and post processing configurations
    pre_cfg = getattr(cfg, "preprocessing", {})
    pre2_cfg = getattr(cfg, "preprocessing_2", {})
    post_cfg = cfg.postprocessing

    # default to input values if preprocessing was not requested
@@ -383,6 +384,14 @@ def get_processing_chain(
        raise SystemExit(f"Unknown condition {condition}!")

    # add postprocessing step based on condition
    # if concatenation and splitting do loudness adjustment only on splitted files
    if pre2_cfg.get("concatenate_input", False):
        loudness_postprocessing = None
        loudness_fmt_postprocessing = None
    else:
        loudness_postprocessing = post_cfg.get("loudness")
        loudness_fmt_postprocessing = post_cfg.get("loudness_fmt")

    chain["processes"].append(
        Postprocessing(
            {
@@ -391,8 +400,8 @@ def get_processing_chain(
                "out_fs": post_cfg.get("fs"),
                "out_fmt": post_cfg.get("fmt"),
                "out_cutoff": tmp_lp_cutoff,
                "out_loudness": post_cfg.get("loudness"),
                "out_loudness_fmt": post_cfg.get("loudness_fmt"),
                "out_loudness": loudness_postprocessing,
                "out_loudness_fmt": loudness_fmt_postprocessing,
                "bin_dataset": post_cfg.get("bin_dataset"),
                "bin_lfe_gain": post_cfg.get("bin_lfe_gain"),
                "limit": post_cfg.get("limit", True),