2 * Copyright (C) 2016 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 #ifndef ANDROID_EFFECT_ENVIRONMENTALREVERB_CORE_H_
18 #define ANDROID_EFFECT_ENVIRONMENTALREVERB_CORE_H_
20 #include <system/audio_effect.h>
27 static const effect_uuid_t SL_IID_ENVIRONMENTALREVERB_ = { 0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac,
28 { 0x4e, 0x23, 0x4d, 0x6, 0x83, 0x9e } };
29 const effect_uuid_t * const SL_IID_ENVIRONMENTALREVERB = &SL_IID_ENVIRONMENTALREVERB_;
32 /* enumerated parameter settings for environmental reverb effect */
35 // Parameters below are as defined in OpenSL ES specification for environmental reverb interface
36 REVERB_PARAM_ROOM_LEVEL, // in millibels, range -6000 to 0
37 REVERB_PARAM_ROOM_HF_LEVEL, // in millibels, range -4000 to 0
38 REVERB_PARAM_DECAY_TIME, // in milliseconds, range 100 to 20000
39 REVERB_PARAM_DECAY_HF_RATIO, // in permilles, range 100 to 1000
40 REVERB_PARAM_REFLECTIONS_LEVEL, // in millibels, range -6000 to 0
41 REVERB_PARAM_REFLECTIONS_DELAY, // in milliseconds, range 0 to 65
42 REVERB_PARAM_REVERB_LEVEL, // in millibels, range -6000 to 0
43 REVERB_PARAM_REVERB_DELAY, // in milliseconds, range 0 to 65
44 REVERB_PARAM_DIFFUSION, // in permilles, range 0 to 1000
45 REVERB_PARAM_DENSITY, // in permilles, range 0 to 1000
46 REVERB_PARAM_PROPERTIES,
48 } t_env_reverb_params;
50 //t_reverb_settings is equal to SLEnvironmentalReverbSettings defined in OpenSL ES specification.
51 typedef struct s_reverb_settings {
56 int16_t reflectionsLevel;
57 uint32_t reflectionsDelay;
62 } __attribute__((packed)) t_reverb_settings;
70 #endif /*ANDROID_EFFECT_ENVIRONMENTALREVERB_CORE_H_*/