2 * Copyright (C) 2008 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #include <cubeb/cubeb-stdint.h>
20 * The following definitions are copied from the android sources. Only the
21 * relevant enum member and values needed are copied.
25 * From https://android.googlesource.com/platform/frameworks/base/+/android-2.2.3_r2.1/include/utils/Errors.h
27 typedef int32_t status_t
;
30 * From https://android.googlesource.com/platform/frameworks/base/+/android-2.2.3_r2.1/include/media/AudioTrack.h
55 * From https://android.googlesource.com/platform/frameworks/base/+/android-2.2.3_r2.1/include/media/AudioSystem.h
57 * https://android.googlesource.com/platform/system/core/+/android-4.2.2_r1/include/system/audio.h
60 #define AUDIO_STREAM_TYPE_MUSIC 3
63 AUDIO_CHANNEL_OUT_FRONT_LEFT_ICS
= 0x1,
64 AUDIO_CHANNEL_OUT_FRONT_RIGHT_ICS
= 0x2,
65 AUDIO_CHANNEL_OUT_MONO_ICS
= AUDIO_CHANNEL_OUT_FRONT_LEFT_ICS
,
66 AUDIO_CHANNEL_OUT_STEREO_ICS
= (AUDIO_CHANNEL_OUT_FRONT_LEFT_ICS
| AUDIO_CHANNEL_OUT_FRONT_RIGHT_ICS
)
67 } AudioTrack_ChannelMapping_ICS
;
70 AUDIO_CHANNEL_OUT_FRONT_LEFT_Froyo
= 0x4,
71 AUDIO_CHANNEL_OUT_FRONT_RIGHT_Froyo
= 0x8,
72 AUDIO_CHANNEL_OUT_MONO_Froyo
= AUDIO_CHANNEL_OUT_FRONT_LEFT_Froyo
,
73 AUDIO_CHANNEL_OUT_STEREO_Froyo
= (AUDIO_CHANNEL_OUT_FRONT_LEFT_Froyo
| AUDIO_CHANNEL_OUT_FRONT_RIGHT_Froyo
)
74 } AudioTrack_ChannelMapping_Froyo
;
77 AUDIO_FORMAT_PCM
= 0x00000000,
78 AUDIO_FORMAT_PCM_SUB_16_BIT
= 0x1,
79 AUDIO_FORMAT_PCM_16_BIT
= (AUDIO_FORMAT_PCM
| AUDIO_FORMAT_PCM_SUB_16_BIT
),
80 } AudioTrack_SampleType
;