Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
Eric Laurent | fd84f97 | 2010-07-08 15:32:51 -0700 | [diff] [blame] | 17 | #ifndef ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_ |
| 18 | #define ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_ |
Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 19 | |
| 20 | #include <media/EffectApi.h> |
| 21 | |
| 22 | #if __cplusplus |
| 23 | extern "C" { |
| 24 | #endif |
| 25 | |
Eric Laurent | ca57d1c | 2010-07-23 00:19:11 -0700 | [diff] [blame] | 26 | #ifndef OPENSL_ES_H_ |
Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 27 | static const effect_uuid_t SL_IID_ENVIRONMENTALREVERB_ = { 0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac, { 0x4e, 0x23, 0x4d, 0x6, 0x83, 0x9e } }; |
| 28 | const effect_uuid_t * const SL_IID_ENVIRONMENTALREVERB = &SL_IID_ENVIRONMENTALREVERB_; |
Eric Laurent | ca57d1c | 2010-07-23 00:19:11 -0700 | [diff] [blame] | 29 | #endif //OPENSL_ES_H_ |
Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 30 | |
Eric Laurent | fd84f97 | 2010-07-08 15:32:51 -0700 | [diff] [blame] | 31 | /* enumerated parameter settings for environmental reverb effect */ |
Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 32 | typedef enum |
| 33 | { |
Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 34 | // Parameters below are as defined in OpenSL ES specification for environmental reverb interface |
| 35 | REVERB_PARAM_ROOM_LEVEL, // in millibels, range -6000 to 0 |
| 36 | REVERB_PARAM_ROOM_HF_LEVEL, // in millibels, range -4000 to 0 |
| 37 | REVERB_PARAM_DECAY_TIME, // in milliseconds, range 100 to 20000 |
| 38 | REVERB_PARAM_DECAY_HF_RATIO, // in permilles, range 100 to 1000 |
| 39 | REVERB_PARAM_REFLECTIONS_LEVEL, // in millibels, range -6000 to 0 |
| 40 | REVERB_PARAM_REFLECTIONS_DELAY, // in milliseconds, range 0 to 65 |
| 41 | REVERB_PARAM_REVERB_LEVEL, // in millibels, range -6000 to 0 |
| 42 | REVERB_PARAM_REVERB_DELAY, // in milliseconds, range 0 to 65 |
| 43 | REVERB_PARAM_DIFFUSION, // in permilles, range 0 to 1000 |
| 44 | REVERB_PARAM_DENSITY, // in permilles, range 0 to 1000 |
Eric Laurent | fd84f97 | 2010-07-08 15:32:51 -0700 | [diff] [blame] | 45 | REVERB_PARAM_PROPERTIES, |
| 46 | REVERB_PARAM_BYPASS |
| 47 | } t_env_reverb_params; |
Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 48 | |
Eric Laurent | ca57d1c | 2010-07-23 00:19:11 -0700 | [diff] [blame] | 49 | //t_reverb_settings is equal to SLEnvironmentalReverbSettings defined in OpenSL ES specification. |
| 50 | typedef struct s_reverb_settings { |
Eric Laurent | 95d5de0 | 2010-09-08 16:06:18 -0700 | [diff] [blame] | 51 | int16_t roomLevel; |
| 52 | int16_t roomHFLevel; |
| 53 | uint32_t decayTime; |
| 54 | int16_t decayHFRatio; |
| 55 | int16_t reflectionsLevel; |
| 56 | uint32_t reflectionsDelay; |
| 57 | int16_t reverbLevel; |
| 58 | uint32_t reverbDelay; |
| 59 | int16_t diffusion; |
| 60 | int16_t density; |
Eric Laurent | ca57d1c | 2010-07-23 00:19:11 -0700 | [diff] [blame] | 61 | } __attribute__((packed)) t_reverb_settings; |
Eric Laurent | 5fe37c6 | 2010-05-21 06:05:13 -0700 | [diff] [blame] | 62 | |
| 63 | |
| 64 | #if __cplusplus |
| 65 | } // extern "C" |
| 66 | #endif |
| 67 | |
| 68 | |
Eric Laurent | fd84f97 | 2010-07-08 15:32:51 -0700 | [diff] [blame] | 69 | #endif /*ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_*/ |