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

Commit 62cdc56b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7743222 from bd1eee2a to sc-v2-release

Change-Id: I3818a775bf0725081ed15a3ff65a429a7e6a748c
parents 06f0ee41 bd1eee2a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -502,6 +502,7 @@ aidl_interface {
    srcs: [
        "aidl/android/media/INativeSpatializerCallback.aidl",
        "aidl/android/media/ISpatializer.aidl",
        "aidl/android/media/ISpatializerHeadTrackingCallback.aidl",
    ],
    imports: [
        "audiopolicy-types-aidl",
+0 −11
Original line number Diff line number Diff line
@@ -31,15 +31,4 @@ oneway interface INativeSpatializerCallback {
     * (e.g. when the spatializer is enabled or disabled)
     */
    void onLevelChanged(SpatializationLevel level);

    /** Called when the head tracking mode has changed
     */
    void onHeadTrackingModeChanged(SpatializerHeadTrackingMode mode);

    /** Called when the head to stage pose hase been updated
     * The head to stage pose is conveyed as a vector of 6 elements,
     * where the first three are a translation vector and
     * the last three are a rotation vector.
     */
    void onHeadToSoundStagePoseUpdated(in float[] headToStage);
}
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.media;

import android.media.ISpatializerHeadTrackingCallback;
import android.media.SpatializationLevel;
import android.media.SpatializationMode;
import android.media.SpatializerHeadTrackingMode;
@@ -103,4 +104,13 @@ interface ISpatializer {
     * retrieved with IAudioPolicyService.getSpatializer().
     */
    SpatializationMode[] getSupportedModes();

    /**
     * Registers a callback to monitor head tracking functions.
     * Only one callback can be registered on a Spatializer.
     * The last callback registered wins and passing a nullptr unregisters
     * last registered callback.
     */
    void registerHeadTrackingCallback(@nullable ISpatializerHeadTrackingCallback callback);

}
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.media;

import android.media.SpatializationLevel;
import android.media.SpatializerHeadTrackingMode;

/**
 * The ISpatializerHeadTrackingCallback interface is a callback associated to the
 * Spatializer head tracking function. It can be registered via the ISpatializer
 * interface to monitor head tracking related states.
 * {@hide}
 */
oneway interface ISpatializerHeadTrackingCallback {
    /** Called when the head tracking mode has changed
     */
    void onHeadTrackingModeChanged(SpatializerHeadTrackingMode mode);

    /** Called when the head to stage pose hase been updated
     * The head to stage pose is conveyed as a vector of 6 elements,
     * where the first three are a translation vector and
     * the last three are a rotation vector.
     */
    void onHeadToSoundStagePoseUpdated(in float[] headToStage);
}
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ cc_library_shared {
        "libsensorprivacy",
        "libshmemcompat",
        "libutils",
        "libstagefright_foundation",
        "audioclient-types-aidl-cpp",
        "audioflinger-aidl-cpp",
        "audiopolicy-aidl-cpp",
Loading