Commit 52f56843 authored by PLAINSI's avatar PLAINSI
Browse files

Fix lint complaints

parent 7074a592
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ def csv_formatdata(data):
    for row in data:
        yield ["%0.2f" % v for v in row]


def filter_one(
    input: Audio,
    IR: Audio,
@@ -78,7 +79,7 @@ def filter_one(
    # resample IR to input signal
    tmp_IR = copy(IR)
    if input.fs != IR.fs:
        tmp_IR.audio = ssg.resample_poly(IR.audio, input.fs, IR.fs) # resample_itu(tmp_input, IR.fs)
        tmp_IR.audio = ssg.resample_poly(IR.audio, input.fs, IR.fs)
        tmp_IR.fs = input.fs

    # down-scale IR to prevent saturation
@@ -94,6 +95,7 @@ def filter_one(

    return output


def filter_foa(
    input: Audio,
    foa_IR: Audio,
@@ -122,22 +124,22 @@ def filter_foa(
    IR_w = copy(foa_IR)
    IR_w.name = "MONO"
    IR_w.num_channels = 1
    IR_w.audio = foa_IR.audio[:, 0] # np.reshape(foa_IR.audio[:, 0], (-1, 1))
    IR_w.audio = foa_IR.audio[:, 0]

    IR_x = copy(foa_IR)
    IR_x.name = "MONO"
    IR_x.num_channels = 1
    IR_x.audio = foa_IR.audio[:, 1] # np.reshape(foa_IR.audio[:, 1], (-1, 1))
    IR_x.audio = foa_IR.audio[:, 1]

    IR_y = copy(foa_IR)
    IR_y.name = "MONO"
    IR_y.num_channels = 1
    IR_y.audio = foa_IR.audio[:, 2] # np.reshape(foa_IR.audio[:, 2], (-1, 1))
    IR_y.audio = foa_IR.audio[:, 2]

    IR_z = copy(foa_IR)
    IR_z.name = "MONO"
    IR_z.num_channels = 1
    IR_z.audio = foa_IR.audio[:, 3] # np.reshape(foa_IR.audio[:, 3], (-1, 1))
    IR_z.audio = foa_IR.audio[:, 3]

    # calculate the scaling (multiplicative) factor such that the maximum gain of the IR filter across all frequencies is 0dB
    if align is None: