MESH-Benchmark / code /generation /native /source_xyz.patch
Heiheihaha17's picture
Add files using upload-large-folder tool
85407a7 verified
Raw History Blame Contribute Delete
853 Bytes
diff --git a/src/esp/sensor/AudioSensor.cpp b/src/esp/sensor/AudioSensor.cpp
index 91afe8c..1e2e350 100644
--- a/src/esp/sensor/AudioSensor.cpp
+++ b/src/esp/sensor/AudioSensor.cpp
@@ -144,8 +144,11 @@ void AudioSensor::runSimulation(sim::Simulator& sim) {
newSource_ = false;
ESP_DEBUG() << logHeader_
<< "Adding source at position : " << lastSourcePos_;
+ // Magnum::Vector3 is zero-indexed. Using [1], [2], [3] silently dropped
+ // the world-x coordinate and read one float out of bounds, corrupting all
+ // rendered source positions and therefore the FOA direction labels.
audioSimulator_->AddSource(RLRAudioPropagation::Vector3f{
- lastSourcePos_[1], lastSourcePos_[2], lastSourcePos_[3]});
+ lastSourcePos_[0], lastSourcePos_[1], lastSourcePos_[2]});
}
// Run the audio simulation