Home | History | Annotate | Download | only in audio_effects
      1 /*
      2  * Copyright (C) 2016 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_NS_CORE_H_
     18 #define ANDROID_EFFECT_NS_CORE_H_
     19 
     20 #include <system/audio_effect.h>
     21 
     22 #if __cplusplus
     23 extern "C" {
     24 #endif
     25 
     26 // The NS 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_NS_ =
     29     { 0x58b4b260, 0x8e06, 0x11e0, 0xaa8e, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
     30 const effect_uuid_t * const FX_IID_NS = &FX_IID_NS_;
     31 
     32 typedef enum
     33 {
     34     NS_PARAM_LEVEL,             // noise suppression level (t_ns_level)
     35     NS_PARAM_PROPERTIES,
     36     NS_PARAM_TYPE               // noise suppression type (t_ns_type)
     37 } t_ns_params;
     38 
     39 // noise suppression level
     40 typedef enum {
     41     NS_LEVEL_LOW,
     42     NS_LEVEL_MEDIUM,
     43     NS_LEVEL_HIGH
     44 } t_ns_level;
     45 
     46 // noise suppression type
     47 typedef enum {
     48     NS_TYPE_SINGLE_CHANNEL,
     49     NS_TYPE_MULTI_CHANNEL
     50 } t_ns_type;
     51 
     52 // s_ns_settings groups all current ns settings for backup and restore.
     53 typedef struct s_ns_settings {
     54     uint32_t  level;
     55     uint32_t  type;
     56 } t_ns_settings;
     57 
     58 #if __cplusplus
     59 }  // extern "C"
     60 #endif
     61 
     62 
     63 #endif /*ANDROID_EFFECT_NS_CORE_H_*/
     64