• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 /*
17  * supply the fuction delaration of the audio effect model, which maybe used by the ISV/OEM.
18  */
19 
20 #ifndef EFFECT_CORE_H
21 #define EFFECT_CORE_H
22 
23 #include <dlfcn.h>
24 #include <stdbool.h>
25 #include <stdlib.h>
26 #include "effect_host_common.h"
27 
28 /* define the struct here */
29 struct EffectFactoryLibListNode {
30     struct EffectFactory *factLib;
31     struct DListHead list;  /**< Factory library list */
32     void *handle;
33 };
34 
35 struct ControllerManagerNode {
36     struct ControllerManager *ctrlMgr;
37     struct DListHead list;
38 };
39 
40 /* declare the function here */
41 bool IsEffectLibExist(void);
42 int32_t RegisterEffectLibToList(void *handle, struct EffectFactory *factLib);
43 struct EffectFactory *GetEffectLibFromList(const char *effectLibName);
44 void ReleaseLibFromList(void);
45 int32_t RegisterControllerToList(struct ControllerManager *ctrlMgr);
46 struct ControllerManager *GetControllerFromList(char *effectId);
47 
48 #endif
49