blob: 6371adba1c26ebb10fd813a24be1e8226fdbc6ed [file] [log] [blame]
Eric Laurent135ad072010-05-21 06:05:13 -07001/*
2 * Copyright (C) 2010 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
17#ifndef ANDROID_EFFECTREVERBAPI_H_
18#define ANDROID_EFFECTREVERBAPI_H_
19
20#include <media/EffectApi.h>
21
22#if __cplusplus
23extern "C" {
24#endif
25
26// TODO: include OpenSLES_IID.h instead
27static const effect_uuid_t SL_IID_ENVIRONMENTALREVERB_ = { 0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac, { 0x4e, 0x23, 0x4d, 0x6, 0x83, 0x9e } };
28const effect_uuid_t * const SL_IID_ENVIRONMENTALREVERB = &SL_IID_ENVIRONMENTALREVERB_;
29
30static const effect_uuid_t SL_IID_PRESETREVERB_ = { 0x47382d60, 0xddd8, 0x11db, 0xbf3a, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
31const effect_uuid_t * const SL_IID_PRESETREVERB = &SL_IID_PRESETREVERB_;
32
33/* enumerated parameter settings for Reverb effect */
34typedef enum
35{
36 REVERB_PARAM_BYPASS,
37 REVERB_PARAM_PRESET,
38 // Parameters below are as defined in OpenSL ES specification for environmental reverb interface
39 REVERB_PARAM_ROOM_LEVEL, // in millibels, range -6000 to 0
40 REVERB_PARAM_ROOM_HF_LEVEL, // in millibels, range -4000 to 0
41 REVERB_PARAM_DECAY_TIME, // in milliseconds, range 100 to 20000
42 REVERB_PARAM_DECAY_HF_RATIO, // in permilles, range 100 to 1000
43 REVERB_PARAM_REFLECTIONS_LEVEL, // in millibels, range -6000 to 0
44 REVERB_PARAM_REFLECTIONS_DELAY, // in milliseconds, range 0 to 65
45 REVERB_PARAM_REVERB_LEVEL, // in millibels, range -6000 to 0
46 REVERB_PARAM_REVERB_DELAY, // in milliseconds, range 0 to 65
47 REVERB_PARAM_DIFFUSION, // in permilles, range 0 to 1000
48 REVERB_PARAM_DENSITY, // in permilles, range 0 to 1000
49 REVERB_PARAM_PROPERTIES
50} t_reverb_params;
51
52
53typedef enum
54{
55 REVERB_PRESET_LARGE_HALL,
56 REVERB_PRESET_HALL,
57 REVERB_PRESET_CHAMBER,
58 REVERB_PRESET_ROOM,
59} t_reverb_presets;
60
61//t_reverb_properties is equal to SLEnvironmentalReverbSettings defined in OpenSL ES specification.
62typedef struct s_reverb_properties {
63 int16_t roomLevel;
64 int16_t roomHFLevel;
65 int32_t decayTime;
66 int16_t decayHFRatio;
67 int16_t reflectionsLevel;
68 int32_t reflectionsDelay;
69 int32_t reverbDelay;
70 int16_t reverbLevel;
71 int16_t diffusion;
72 int16_t density;
73 int16_t padding;
74} t_reverb_properties;
75
76
77#if __cplusplus
78} // extern "C"
79#endif
80
81
82#endif /*ANDROID_EFFECTREVERBAPI_H_*/