author criss <>
Mon, 18 Oct 2021 16:30:48 +0300
changeset 596179 ee8efced380b871deac4fba285955953a4a89ef5
parent 587484 6fa0a7ffc051554f01ab66cf0d8a517fe5211e34
permissions -rw-r--r--
Backed out changeset 21276955f659 (bug 1720926) for causing hybrid bustages on nsIPrincipal. CLOSED TREE

 * Copyright (C) 2010 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
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.

 * This file is similar to the file "OpenSLES_AndroidConfiguration.h" found in
 * the Android NDK, but removes the #ifdef __cplusplus defines, so we can keep
 * using a C compiler in cubeb.


/* Android AudioRecorder configuration                                       */

/** Audio recording preset */
/** Audio recording preset key */
#define SL_ANDROID_KEY_RECORDING_PRESET                                        \
  ((const SLchar *)"androidRecordingPreset")
/** Audio recording preset values */
/**   preset "none" cannot be set, it is used to indicate the current settings
 *     do not match any of the presets. */
#define SL_ANDROID_RECORDING_PRESET_NONE ((SLuint32)0x00000000)
/**   generic recording configuration on the platform */
#define SL_ANDROID_RECORDING_PRESET_GENERIC ((SLuint32)0x00000001)
/**   uses the microphone audio source with the same orientation as the camera
 *     if available, the main device microphone otherwise */
/**   uses the main microphone tuned for voice recognition */
/**   uses the main microphone tuned for audio communications */
/**   uses the main microphone unprocessed */

/* Android AudioPlayer configuration                                         */

/** Audio playback stream type */
/** Audio playback stream type key */
#define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar *)"androidPlaybackStreamType")

/** Audio playback stream type  values */
/*      same as */
#define SL_ANDROID_STREAM_VOICE ((SLint32)0x00000000)
/*      same as */
#define SL_ANDROID_STREAM_SYSTEM ((SLint32)0x00000001)
/*      same as */
#define SL_ANDROID_STREAM_RING ((SLint32)0x00000002)
/*      same as */
#define SL_ANDROID_STREAM_MEDIA ((SLint32)0x00000003)
/*      same as */
#define SL_ANDROID_STREAM_ALARM ((SLint32)0x00000004)
/*      same as */
#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32)0x00000005)

/* Android AudioPlayer and AudioRecorder configuration                       */

/** Audio Performance mode.
 * Performance mode tells the framework how to configure the audio path
 * for a player or recorder according to application performance and
 * functional requirements.
 * It affects the output or input latency based on acceptable tradeoffs on
 * battery drain and use of pre or post processing effects.
 * Performance mode should be set before realizing the object and should be
 * read after realizing the object to check if the requested mode could be
 * granted or not.
/** Audio Performance mode key */
#define SL_ANDROID_KEY_PERFORMANCE_MODE                                        \
  ((const SLchar *)"androidPerformanceMode")

/** Audio performance values */
/*      No specific performance requirement. Allows HW and SW pre/post
 * processing. */
#define SL_ANDROID_PERFORMANCE_NONE ((SLuint32)0x00000000)
/*      Priority given to latency. No HW or software pre/post processing.
 *      This is the default if no performance mode is specified. */
#define SL_ANDROID_PERFORMANCE_LATENCY ((SLuint32)0x00000001)
/*      Priority given to latency while still allowing HW pre and post
 * processing. */
/*      Priority given to power saving if latency is not a concern.
 *      Allows HW and SW pre/post processing. */
#define SL_ANDROID_PERFORMANCE_POWER_SAVING ((SLuint32)0x00000003)