2 * Copyright (C) 2010 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 #define DEVICE_ID_HEADSET 1
18 #define DEVICE_ID_HANDSFREE 2
20 extern const struct AudioInput_id_descriptor {
22 const SLAudioInputDescriptor *descriptor;
23 } AudioInput_id_descriptors[];
25 extern const struct AudioOutput_id_descriptor {
27 const SLAudioOutputDescriptor *descriptor;
28 } AudioOutput_id_descriptors[];
30 extern const struct LED_id_descriptor {
32 const SLLEDDescriptor *descriptor;
33 } LED_id_descriptors[];
35 extern const struct Vibra_id_descriptor {
37 const SLVibraDescriptor *descriptor;
38 } Vibra_id_descriptors[];
40 // These are not in 1.0.1 header file
41 #define SL_AUDIOCODEC_NULL 0
42 #define SL_AUDIOCODEC_VORBIS 9
44 /** \brief Associates a codec ID with a corresponding codec descriptor */
47 SLuint32 mCodecID; ///< The codec ID
48 const SLAudioCodecDescriptor *mDescriptor; ///< The corresponding descriptor
51 #define MAX_DECODERS 9 ///< (sizeof(Decoder_IDs) / sizeof(Decoder_IDs[0]))
52 #define MAX_ENCODERS 9 ///< (sizeof(Encoder_IDs) / sizeof(Encoder_IDs[0]))
54 // For now, but encoders might be different than decoders later
55 extern const SLuint32 *Decoder_IDs, *Encoder_IDs;
57 extern const CodecDescriptor DecoderDescriptors[], EncoderDescriptors[];
59 extern SLresult GetCodecCapabilities(SLuint32 decoderId, SLuint32 *pIndex,
60 SLAudioCodecDescriptor *pDescriptor,
61 const CodecDescriptor *codecDescriptors);