@@ -2149,9 +2149,9 @@ def image_source_model(self):
2149
2149
self .visibility = []
2150
2150
2151
2151
for source in self .sources :
2152
- n_sources = self .room_engine .image_source_model (source .position )
2152
+ n_visible_sources = self .room_engine .image_source_model (source .position )
2153
2153
2154
- if n_sources > 0 :
2154
+ if n_visible_sources > 0 :
2155
2155
# Copy to python managed memory
2156
2156
source .images = self .room_engine .sources .copy ()
2157
2157
source .orders = self .room_engine .orders .copy ()
@@ -2181,6 +2181,10 @@ def image_source_model(self):
2181
2181
# if not, it's not visible from anywhere!
2182
2182
if not self .is_inside (self .mic_array .R [:, m ]):
2183
2183
self .visibility [- 1 ][m , :] = 0
2184
+ else :
2185
+ # if we are here, this means even the direct path is not visible
2186
+ # we set the visibility of the direct path as 0
2187
+ self .visibility .append (np .zeros ((self .mic_array .M , 1 )))
2184
2188
2185
2189
# Update the state
2186
2190
self .simulator_state ["ism_done" ] = True
@@ -2315,9 +2319,6 @@ def compute_rir(self):
2315
2319
degrees = False ,
2316
2320
)
2317
2321
2318
- # Use the Cython extension for the fractional delays
2319
- # from .build_rir import fast_rir_builder
2320
-
2321
2322
vis = self .visibility [s ][m , :].astype (np .int32 )
2322
2323
# we add the delay due to the factional delay filter to
2323
2324
# the arrival times to avoid problems when propagation
0 commit comments