From 6f5f88e9ed90b41a74fff7a53ba376aeee808495 Mon Sep 17 00:00:00 2001 From: Robin Scheibler Date: Mon, 28 Oct 2024 00:11:23 +0900 Subject: [PATCH] Re-fixes issue #353 in the dirpat branch. --- pyroomacoustics/simulation/ism.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyroomacoustics/simulation/ism.py b/pyroomacoustics/simulation/ism.py index c2840acd..02479179 100644 --- a/pyroomacoustics/simulation/ism.py +++ b/pyroomacoustics/simulation/ism.py @@ -195,8 +195,12 @@ def compute_ism_rir( time.max() ) # The image source which takes the most time to arrive to this particular microphone - # What will be the length of RIR according to t_max - N = int(math.ceil(t_max * fs + fdl2 + 1)) + # Here we create an array of the right length to + # receiver the full RIR + # The +1 is due to some rare cases where numerical + # errors push the last sample over the end of the + # array + N = int(math.ceil(t_max * fs + fdl2 + 1)) + 1 oct_band_amplitude = att / dist full_band_imp_resp = []