OpenSLES_AndroidConfiguration.h revision b3e52a63baaea367cf411348b68ecd8fd429b029
1/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef OPENSL_ES_ANDROIDCONFIGURATION_H_
18#define OPENSL_ES_ANDROIDCONFIGURATION_H_
19
20#ifdef __cplusplus
21extern "C" {
22
23/*---------------------------------------------------------------------------*/
24/* Android AudioRecorder configuration                                       */
25/*---------------------------------------------------------------------------*/
26
27/** Audio recording preset */
28/** Audio recording preset key */
29#define SL_ANDROID_KEY_RECORDING_PRESET ((const SLchar*) "androidRecordingPreset")
30/** Audio recording preset values */
31/**   preset "none" cannot be set, it is used to indicate the current settings
32 *     do not match any of the presets. */
33#define SL_ANDROID_RECORDING_PRESET_NONE              ((SLuint32) 0x00000000)
34/**   default recording configuration on the platform */
35#define SL_ANDROID_RECORDING_PRESET_DEFAULT           ((SLuint32) 0x00000001)
36/**   uses the microphone audio source with the same orientation as the camera
37 *     if available, the main device microphone otherwise */
38#define SL_ANDROID_RECORDING_PRESET_CAMCORDER         ((SLuint32) 0x00000002)
39/**   uses the main microphone tuned for voice recognition */
40#define SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION ((SLuint32) 0x00000003)
41
42/*---------------------------------------------------------------------------*/
43/* Android AudioPlayer configuration                                         */
44/*---------------------------------------------------------------------------*/
45
46/** Audio playback stream type */
47/** Audio playback stream type key */
48#define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar*) "androidPlaybackStreamType")
49
50/** Audio playback stream type  values */
51// FIXME remove comments in front of #define below once the SLAndroidStreamTypeItf interface is gone
52/*      same as android.media.AudioManager.STREAM_VOICE_CALL */
53//#define SL_ANDROID_STREAM_VOICE        ((SLint32) 0x00000000)
54/*      same as android.media.AudioManager.STREAM_SYSTEM */
55//#define SL_ANDROID_STREAM_SYSTEM       ((SLint32) 0x00000001)
56/*      same as android.media.AudioManager.STREAM_RING */
57//#define SL_ANDROID_STREAM_RING         ((SLint32) 0x00000002)
58/*      same as android.media.AudioManager.STREAM_MUSIC */
59//#define SL_ANDROID_STREAM_MEDIA        ((SLint32) 0x00000003)
60/*      same as android.media.AudioManager.STREAM_ALARM */
61//#define SL_ANDROID_STREAM_ALARM        ((SLint32) 0x00000004)
62/*      same as android.media.AudioManager.STREAM_NOTIFICATION */
63//#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005)
64
65
66
67}
68#endif /* __cplusplus */
69
70#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */
71