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

Commit a8e1d925 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "SpatializerHelper: Fix device compatibility with spatial audio" into...

Merge "SpatializerHelper: Fix device compatibility with spatial audio" into tm-qpr-dev am: 3590c754

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19674350



Change-Id: Iade45a2b3d06c91abeefc23fee5cecd3938cbd44
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5f737735 3590c754
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -727,8 +727,11 @@ public class SpatializerHelper {
    }

    private boolean isDeviceCompatibleWithSpatializationModes(@NonNull AudioDeviceAttributes ada) {
        // modeForDevice will be neither transaural or binaural for devices that do not support
        // spatial audio. For instance mono devices like earpiece, speaker safe or sco must
        // not be included.
        final byte modeForDevice = (byte) SPAT_MODE_FOR_DEVICE_TYPE.get(ada.getType(),
                /*default when type not found*/ SpatializationMode.SPATIALIZER_BINAURAL);
                /*default when type not found*/ -1);
        if ((modeForDevice == SpatializationMode.SPATIALIZER_BINAURAL && mBinauralSupported)
                || (modeForDevice == SpatializationMode.SPATIALIZER_TRANSAURAL
                        && mTransauralSupported)) {