1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef AUDIO_ENHANCE_CHAIN_ADAPTER_H 17 #define AUDIO_ENHANCE_CHAIN_ADAPTER_H 18 19 #include <stdio.h> 20 #include <stdint.h> 21 #include <pulse/pulseaudio.h> 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 typedef struct EnhanceBufferAttr { 28 uint8_t *input; 29 uint8_t *output; 30 uint32_t refNum; 31 uint32_t micNum; 32 uint32_t outNum; 33 uint32_t sampleRate; 34 uint32_t frameLength; 35 uint32_t dataFormat; 36 uint32_t bitDepth; 37 uint32_t batchLen; 38 uint32_t byteLenPerFrame; 39 } EnhanceBufferAttr; 40 41 int32_t EnhanceChainManagerProcess(const char *sceneType, EnhanceBufferAttr *enhanceBufferAttr); 42 int32_t EnhanceChainManagerCreateCb(const char *sceneType, const char *enhanceMode, const char *upAndDownDevice); 43 int32_t EnhanceChainManagerReleaseCb(const char *sceneType, const char *enhanceMode, const char *upAndDownDevice); 44 bool EnhanceChainManagerExist(const char *sceneType); 45 46 #ifdef __cplusplus 47 } 48 #endif 49 #endif // AUDIO_ENHANCE_CHAIN_ADAPTER_H