Eric Laurent | 4d64e7d | 2011-07-05 11:20:26 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 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 | |
| 17 | #ifndef ANDROID_EFFECT_AGC_H_ |
| 18 | #define ANDROID_EFFECT_AGC_H_ |
| 19 | |
| 20 | #include <hardware/audio_effect.h> |
| 21 | |
| 22 | #if __cplusplus |
| 23 | extern "C" { |
| 24 | #endif |
| 25 | |
| 26 | // The AGC type UUID is not defined by OpenSL ES and has been generated from |
| 27 | // http://www.itu.int/ITU-T/asn1/uuid.html |
| 28 | static const effect_uuid_t FX_IID_AGC_ = |
| 29 | { 0x0a8abfe0, 0x654c, 0x11e0, 0xba26, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }; |
| 30 | const effect_uuid_t * const FX_IID_AGC = &FX_IID_AGC_; |
| 31 | |
| 32 | |
| 33 | typedef enum |
| 34 | { |
| 35 | AGC_PARAM_TARGET_LEVEL, // target output level in millibel |
| 36 | AGC_PARAM_COMP_GAIN, // gain in the compression range in millibel |
| 37 | AGC_PARAM_LIMITER_ENA, // enable or disable limiter (boolean) |
| 38 | AGC_PARAM_PROPERTIES |
| 39 | } t_agc_params; |
| 40 | |
| 41 | |
| 42 | //t_agc_settings groups all current agc settings for backup and restore. |
| 43 | typedef struct s_agc_settings { |
| 44 | int16_t targetLevel; |
| 45 | int16_t compGain; |
| 46 | bool limiterEnabled; |
| 47 | } t_agc_settings; |
| 48 | |
| 49 | #if __cplusplus |
| 50 | } // extern "C" |
| 51 | #endif |
| 52 | |
| 53 | |
| 54 | #endif /*ANDROID_EFFECT_AGC_H_*/ |