Pass the bed positions to the HRTF renderer
This commit is contained in:
1 parent
5c4f876411
commit
247e2a90b6
2 files changed
+6
-2
No files matched your search
@@ -14,6 +14,7 @@ from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
|
||||
from bed_layout import bed_object_positions
|
||||
from binaural_metadata import OamdPositionTimeline
|
||||
from rosella_core import RosellaRenderer
|
||||
from rosella_direct import BINAURAL_PROFILE_NAMES
|
||||
@@ -71,7 +72,8 @@ class RosellaBinauralRenderer:
|
||||
tail_seconds: float = 5.0,
|
||||
output_gain: float = 1.0,
|
||||
chunk_frames: int = 64,
|
||||
room_impulse_slots: int = 4096):
|
||||
room_impulse_slots: int = 4096,
|
||||
bed_channels=None):
|
||||
if mode not in BINAURAL_PROFILE_NAMES:
|
||||
raise ValueError("binaural mode must be near, mid, or far")
|
||||
if int(object_delay_samples) < 0:
|
||||
@@ -111,7 +113,8 @@ class RosellaBinauralRenderer:
|
||||
room_impulse_slots=room_impulse_slots)
|
||||
self.hybrid_synthesis = HybridSynthesis(OUTPUT_CHANNELS, self.kernel_data)
|
||||
self.qmf_synthesis = QmfSynthesis(OUTPUT_CHANNELS, self.kernel_data)
|
||||
self.timeline = OamdPositionTimeline(15)
|
||||
self.timeline = OamdPositionTimeline(
|
||||
15, bed_positions=bed_object_positions(bed_channels or ()))
|
||||
|
||||
self._input_buffer = np.empty(
|
||||
(self.chunk_samples, SOURCE_CHANNELS), dtype=np.float64)
|
||||
|
||||
Reference in new issue
Block a user