Commit 69b14aff authored by Anika Treffehn's avatar Anika Treffehn
Browse files

changed datatype of latency

parent 8c0bfa26
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ def load_hrtf(
        raise KeyError(f"Key 'IR' not found in .mat file: {filename} !")

    SourcePosition = mat_contents.get("SourcePosition")
    latency_s = mat_contents.get("latency_s")
    latency_s = mat_contents.get("latency_s").astype(np.int32)[0, 0]

    return IR, SourcePosition, latency_s

@@ -167,7 +167,7 @@ def load_ir(
    IR, SourcePosition, latency_s = load_hrtf(path_dataset)

    if latency_s is not None:
        latency_smp = latency_s[0, 0]
        latency_smp = latency_s
    else:
        latency_smp = int(np.min(np.argmax(np.sum(np.abs(IR), axis=1), axis=0)))
        warnings.warn(