File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,9 @@ def to_audio(
259259 # Place the speakers around the furnitures in the room
260260 for _role , _kwargs in speaker_positions .items ():
261261
262+ if _role in room .speakers_positions :
263+ continue
264+
262265 room .place_speaker_around_furniture (
263266 speaker_name = _role ,
264267 furniture_name = _kwargs ["furniture_name" ],
Original file line number Diff line number Diff line change @@ -1449,6 +1449,11 @@ def model_post_init(self, __context: Any) -> None:
14491449 Post init function to set the microphone position 3D.
14501450 """
14511451
1452+ if len (self .speakers_positions ) > 0 :
1453+ for _role , _position in self .speakers_positions .items ():
1454+ if _role not in [Role .SPEAKER_1 , Role .SPEAKER_2 ]:
1455+ raise ValueError (f"Speaker name '{ _role } ' is not valid, the speaker wasn't placed" )
1456+
14521457 # if the user override the center of the room, add it to the furnitures
14531458 if "center" not in self .furnitures :
14541459 self .furnitures ["center" ] = Furniture (
You can’t perform that action at this time.
0 commit comments