Skip to content

Commit 6f5f88e

Browse files
committed
Re-fixes issue #353 in the dirpat branch.
1 parent 0fd67c4 commit 6f5f88e

File tree

1 file changed

+6
-2
lines changed
  • pyroomacoustics/simulation

1 file changed

+6
-2
lines changed

pyroomacoustics/simulation/ism.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,12 @@ def compute_ism_rir(
195195
time.max()
196196
) # The image source which takes the most time to arrive to this particular microphone
197197

198-
# What will be the length of RIR according to t_max
199-
N = int(math.ceil(t_max * fs + fdl2 + 1))
198+
# Here we create an array of the right length to
199+
# receiver the full RIR
200+
# The +1 is due to some rare cases where numerical
201+
# errors push the last sample over the end of the
202+
# array
203+
N = int(math.ceil(t_max * fs + fdl2 + 1)) + 1
200204

201205
oct_band_amplitude = att / dist
202206
full_band_imp_resp = []

0 commit comments

Comments
 (0)