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
21 extern "C" {
22 #endif
23 
24 /*---------------------------------------------------------------------------*/
25 /* Android AudioRecorder configuration                                       */
26 /*---------------------------------------------------------------------------*/
27 
28 /** Audio recording preset */
29 /** Audio recording preset key */
30 #define SL_ANDROID_KEY_RECORDING_PRESET ((const SLchar*) "androidRecordingPreset")
31 /** Audio recording preset values */
32 /**   preset "none" cannot be set, it is used to indicate the current settings
33  *     do not match any of the presets. */
34 #define SL_ANDROID_RECORDING_PRESET_NONE                ((SLuint32) 0x00000000)
35 /**   generic recording configuration on the platform */
36 #define SL_ANDROID_RECORDING_PRESET_GENERIC             ((SLuint32) 0x00000001)
37 /**   uses the microphone audio source with the same orientation as the camera
38  *     if available, the main device microphone otherwise */
39 #define SL_ANDROID_RECORDING_PRESET_CAMCORDER           ((SLuint32) 0x00000002)
40 /**   uses the main microphone tuned for voice recognition */
41 #define SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION   ((SLuint32) 0x00000003)
42 /**   uses the main microphone tuned for audio communications */
43 #define SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION ((SLuint32) 0x00000004)
44 /**   uses the main microphone unprocessed */
45 #define SL_ANDROID_RECORDING_PRESET_UNPROCESSED         ((SLuint32) 0x00000005)
46 
47 
48 /*---------------------------------------------------------------------------*/
49 /* Android AudioPlayer configuration                                         */
50 /*---------------------------------------------------------------------------*/
51 
52 /** Audio playback stream type */
53 /** Audio playback stream type key */
54 #define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar*) "androidPlaybackStreamType")
55 
56 /** Audio playback stream type  values */
57 /*      same as android.media.AudioManager.STREAM_VOICE_CALL */
58 #define SL_ANDROID_STREAM_VOICE        ((SLint32) 0x00000000)
59 /*      same as android.media.AudioManager.STREAM_SYSTEM */
60 #define SL_ANDROID_STREAM_SYSTEM       ((SLint32) 0x00000001)
61 /*      same as android.media.AudioManager.STREAM_RING */
62 #define SL_ANDROID_STREAM_RING         ((SLint32) 0x00000002)
63 /*      same as android.media.AudioManager.STREAM_MUSIC */
64 #define SL_ANDROID_STREAM_MEDIA        ((SLint32) 0x00000003)
65 /*      same as android.media.AudioManager.STREAM_ALARM */
66 #define SL_ANDROID_STREAM_ALARM        ((SLint32) 0x00000004)
67 /*      same as android.media.AudioManager.STREAM_NOTIFICATION */
68 #define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005)
69 
70 
71 
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 
76 #endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */
77