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