AudioFormat.java revision f013e1afd1e68af5e3b868c26a653bbfb39538f8
1/*
2 * Copyright (C) 2008 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
17package android.media;
18
19/**
20 * The AudioFormat class is used to access a number of audio format and
21 * channel configuration constants.
22 *
23 * {@hide Pending API council review}
24 */
25public class AudioFormat {
26
27    //---------------------------------------------------------
28    // Constants
29    //--------------------
30    /** Invalid audio data format */
31    public static final int ENCODING_INVALID = 0;
32    /** Default audio data format */
33    public static final int ENCODING_DEFAULT = 1;
34    /** Audio data format: PCM 16 bit per sample */
35    public static final int ENCODING_PCM_16BIT = 2; // accessed by native code
36    /** Audio data format: PCM 8 bit per sample */
37    public static final int ENCODING_PCM_8BIT = 3;  // accessed by native code
38
39    /** Invalid audio channel configuration */
40    public static final int CHANNEL_CONFIGURATION_INVALID   = 0;
41    /** Default audio channel configuration */
42    public static final int CHANNEL_CONFIGURATION_DEFAULT   = 1;
43    /** Mono audio configuration */
44    public static final int CHANNEL_CONFIGURATION_MONO      = 2;
45    /** Stereo (2 channel) audio configuration */
46    public static final int CHANNEL_CONFIGURATION_STEREO    = 3;
47
48}
49
50
51
52