Commit a0f166cc authored by Anika Treffehn's avatar Anika Treffehn
Browse files

use deepcopy instead of copy

parent 17386e05
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
#

import re
from copy import copy
from copy import deepcopy
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Optional
@@ -214,7 +214,7 @@ def lpfilter_itu(

    # resample if samplingrate is not supported
    old_fs = None
    tmp = copy(x)
    tmp = deepcopy(x)
    if x.fs != 48000:
        warn(
            f"Filter type {flt_type} only supported for 48kHz samplingrate, not for {x.fs}Hz -> resampling"
@@ -256,7 +256,7 @@ def hp50filter_itu(

    # set filter type and check if sampling rate is supported
    old_fs = None
    tmp = copy(x)
    tmp = deepcopy(x)
    if x.fs == 48000:
        flt_type = "HP50_48KHZ"
    elif x.fs == 32000:
@@ -310,7 +310,7 @@ def kbp20filter_itu(

    # set filter type and check if sampling rate is supported
    old_fs = None
    tmp = copy(x)
    tmp = deepcopy(x)
    if x.fs == 48000:
        flt_type = "20KBP"
    else:
@@ -428,7 +428,7 @@ def resample_itu(
        raise ValueError("Ratio of input and output sampling frequency not supported")

    # apply filter
    y = copy(x)
    y = deepcopy(x)
    for i, flt in enumerate(flt_type):
        y.audio = filter_itu(y, flt_type=flt, up=up[i], down=down[i])
        y.audio = delay_compensation(