media/libcubeb/src/android/sles_definitions.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libcubeb/src/android/sles_definitions.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,67 @@
     1.4 +/*
     1.5 + * Copyright (C) 2010 The Android Open Source Project
     1.6 + *
     1.7 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.8 + * you may not use this file except in compliance with the License.
     1.9 + * You may obtain a copy of the License at
    1.10 + *
    1.11 + *      http://www.apache.org/licenses/LICENSE-2.0
    1.12 + *
    1.13 + * Unless required by applicable law or agreed to in writing, software
    1.14 + * distributed under the License is distributed on an "AS IS" BASIS,
    1.15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    1.16 + * See the License for the specific language governing permissions and
    1.17 + * limitations under the License.
    1.18 + */
    1.19 +
    1.20 +/**
    1.21 + * This file is similar to the file "OpenSLES_AndroidConfiguration.h" found in
    1.22 + * the Android NDK, but removes the #ifdef __cplusplus defines, so we can keep
    1.23 + * using a C compiler in cubeb.
    1.24 + */
    1.25 +
    1.26 +#ifndef OPENSL_ES_ANDROIDCONFIGURATION_H_
    1.27 +#define OPENSL_ES_ANDROIDCONFIGURATION_H_
    1.28 +
    1.29 +/*---------------------------------------------------------------------------*/
    1.30 +/* Android AudioRecorder configuration                                       */
    1.31 +/*---------------------------------------------------------------------------*/
    1.32 +
    1.33 +/** Audio recording preset */
    1.34 +/** Audio recording preset key */
    1.35 +#define SL_ANDROID_KEY_RECORDING_PRESET ((const SLchar*) "androidRecordingPreset")
    1.36 +/** Audio recording preset values */
    1.37 +/**   preset "none" cannot be set, it is used to indicate the current settings
    1.38 + *     do not match any of the presets. */
    1.39 +#define SL_ANDROID_RECORDING_PRESET_NONE              ((SLuint32) 0x00000000)
    1.40 +/**   generic recording configuration on the platform */
    1.41 +#define SL_ANDROID_RECORDING_PRESET_GENERIC           ((SLuint32) 0x00000001)
    1.42 +/**   uses the microphone audio source with the same orientation as the camera
    1.43 + *     if available, the main device microphone otherwise */
    1.44 +#define SL_ANDROID_RECORDING_PRESET_CAMCORDER         ((SLuint32) 0x00000002)
    1.45 +/**   uses the main microphone tuned for voice recognition */
    1.46 +#define SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION ((SLuint32) 0x00000003)
    1.47 +
    1.48 +/*---------------------------------------------------------------------------*/
    1.49 +/* Android AudioPlayer configuration                                         */
    1.50 +/*---------------------------------------------------------------------------*/
    1.51 +
    1.52 +/** Audio playback stream type */
    1.53 +/** Audio playback stream type key */
    1.54 +#define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar*) "androidPlaybackStreamType")
    1.55 +
    1.56 +/** Audio playback stream type  values */
    1.57 +/*      same as android.media.AudioManager.STREAM_VOICE_CALL */
    1.58 +#define SL_ANDROID_STREAM_VOICE        ((SLint32) 0x00000000)
    1.59 +/*      same as android.media.AudioManager.STREAM_SYSTEM */
    1.60 +#define SL_ANDROID_STREAM_SYSTEM       ((SLint32) 0x00000001)
    1.61 +/*      same as android.media.AudioManager.STREAM_RING */
    1.62 +#define SL_ANDROID_STREAM_RING         ((SLint32) 0x00000002)
    1.63 +/*      same as android.media.AudioManager.STREAM_MUSIC */
    1.64 +#define SL_ANDROID_STREAM_MEDIA        ((SLint32) 0x00000003)
    1.65 +/*      same as android.media.AudioManager.STREAM_ALARM */
    1.66 +#define SL_ANDROID_STREAM_ALARM        ((SLint32) 0x00000004)
    1.67 +/*      same as android.media.AudioManager.STREAM_NOTIFICATION */
    1.68 +#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005)
    1.69 +
    1.70 +#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */

mercurial