1/*
2 * Copyright (C) 2010-2011 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 com.android.audiofx;
18
19/**
20 * OpenSL ES constants class
21 */
22public final class OpenSLESConstants {
23    private OpenSLESConstants() {
24        // Empty constructor
25    }
26
27    /**
28     * Minimum volume level in millibel (mb).
29     */
30    public static final short SL_MILLIBEL_MIN = -9600;
31    /**
32     * This value is used when equalizer setting is not defined.
33     */
34    public static final short SL_EQUALIZER_UNDEFINED = (short) 0xFFFF;
35
36    /**
37     * The minimum bass boost strength in o/oo.
38     */
39    public static final short BASSBOOST_MIN_STRENGTH = 0;
40    /**
41     * The maximum bass boost strength in o/oo.
42     */
43    public static final short BASSBOOST_MAX_STRENGTH = 1000;
44
45    /**
46     * The minimum reverb room level in mb.
47     */
48    public static final short REVERB_MIN_ROOM_LEVEL = SL_MILLIBEL_MIN;
49    /**
50     * The maximum reverb room level in mb.
51     */
52    public static final short REVERB_MAX_ROOM_LEVEL = 0;
53    /**
54     * The minimum reverb room HF level in mb.
55     */
56    public static final short REVERB_MIN_ROOM_HF_LEVEL = SL_MILLIBEL_MIN;
57    /**
58     * The maximum reverb room HF level in mb.
59     */
60    public static final short REVERB_MAX_ROOM_HF_LEVEL = 0;
61    /**
62     * The minimum reverb decay time in ms.
63     */
64    public static final short REVERB_MIN_DECAY_TIME = 100;
65    /**
66     * The maximum reverb decay time in ms.
67     */
68    // XXX: OpenSL ES is normally 20000 but can only support 7000 for now
69    public static final short REVERB_MAX_DECAY_TIME = 7000;
70    /**
71     * The minimum reverb decay HF ratio in o/oo.
72     */
73    public static final short REVERB_MIN_DECAY_HF_RATIO = 100;
74    /**
75     * The maximum reverb decay HF ratio in o/oo.
76     */
77    public static final short REVERB_MAX_DECAY_HF_RATIO = 2000;
78    /**
79     * The minimum reverb level in mb.
80     */
81    public static final short REVERB_MIN_REVERB_LEVEL = SL_MILLIBEL_MIN;
82    /**
83     * The maximum reverb level in mb.
84     */
85    public static final short REVERB_MAX_REVERB_LEVEL = 2000;
86    /**
87     * The minimum reverb diffusion in o/oo.
88     */
89    public static final short REVERB_MIN_DIFFUSION = 0;
90    /**
91     * The maximum reverb diffusion in o/oo.
92     */
93    public static final short REVERB_MAX_DIFFUSION = 1000;
94    /**
95     * The minimum reverb density in o/oo.
96     */
97    public static final short REVERB_MIN_DENSITY = 0;
98    /**
99     * The maximum reverb density in o/oo.
100     */
101    public static final short REVERB_MAX_DENSITY = 1000;
102
103    /**
104     * The minimum virtualizer strength in o/oo.
105     */
106    public static final short VIRTUALIZER_MIN_STRENGTH = 0;
107    /**
108     * The maximum virtualizer strength in o/oo.
109     */
110    public static final short VIRTUALIZER_MAX_STRENGTH = 1000;
111
112    /**
113     * The minimum volume effect level in millibel (mb).
114     */
115    public static final short VOLUME_MIN_LEVEL = SL_MILLIBEL_MIN;
116    /**
117     * The minimum volume stereo position in o/oo.
118     */
119    public static final short VOLUME_MIN_STEREO_POSITION = -1000;
120    /**
121     * The maximum volume stereo position in o/oo.
122     */
123    public static final short VOLUME_MAX_STEREO_POSITION = 1000;
124}
125