Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8913a42 authored by Eric Laurent's avatar Eric Laurent Committed by Andy Hung
Browse files

Spatializer: fix head pose sensor enabling according to latency mode

Fix logic in Spatializer::checkSensorsState_l() to allow disabling
of head pose sensor if low latency mode is not supported.

Bug: 238408306
Test: spatial audio playback on A2DP wihtout low latency support
Merged-In: I3ff1bb83adc899ef020b635cc64fa04ab03e44f7
Change-Id: I3ff1bb83adc899ef020b635cc64fa04ab03e44f7
parent b387fb45
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -861,8 +861,8 @@ void Spatializer::checkSensorsState_l() {
    bool lowLatencySupported = mSupportedLatencyModes.empty()
            || (std::find(mSupportedLatencyModes.begin(), mSupportedLatencyModes.end(),
                    AUDIO_LATENCY_MODE_LOW) != mSupportedLatencyModes.end());
    if (mSupportsHeadTracking && mPoseController != nullptr && lowLatencySupported) {
        if (mNumActiveTracks > 0 && mLevel != SpatializationLevel::NONE
    if (mSupportsHeadTracking && mPoseController != nullptr) {
        if (lowLatencySupported && mNumActiveTracks > 0 && mLevel != SpatializationLevel::NONE
            && mDesiredHeadTrackingMode != HeadTrackingMode::STATIC
            && mHeadSensor != SpatializerPoseController::INVALID_SENSOR) {
            mPoseController->setHeadSensor(mHeadSensor);