• 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 #ifndef OHOS_VDI_AUDIO_V1_0_EFFECTTYPES_H
17 #define OHOS_VDI_AUDIO_V1_0_EFFECTTYPES_H
18 
19 #include <stdbool.h>
20 #include <stdint.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
25 
26 struct EffectInfoVdi {
27     char *libName;
28     char *effectId;
29     int32_t ioDirection;
30 };
31 
32 struct ControllerIdVdi {
33     char *libName;
34     char *effectId;
35 };
36 
37 struct EffectControllerDescriptorVdi {
38     char *effectId;
39     char *effectName;
40     char *libName;
41     char *supplier;
42 };
43 
44 enum AudioEffectBufferVdiTag {
45     EFFECT_BUFFER_VDI_VOID_TYPE = 0x0,
46     EFFECT_BUFFER_VDI_FLOAT_SIGNED_32 = 0x1,
47     EFFECT_BUFFER_VDI_SINGED_32 = 0x2,
48     EFFECT_BUFFER_VDI_SIGNED_16 = 0x4,
49     EFFECT_BUFFER_VDI_UNSIGNED_8 = 0x8,
50     EFFECT_BUFFER_VDI_BUTT,
51 };
52 
53 struct AudioEffectBufferVdi {
54     uint32_t frameCount;
55     int32_t datatag;
56     int8_t *rawData;
57     uint32_t rawDataLen;
58 };
59 
60 enum EffectCommandTableIndexVdi {
61     AUDIO_EFFECT_COMMAND_VDI_INIT_CONTOLLER,
62     AUDIO_EFFECT_COMMAND_VDI_SET_CONFIG,
63     AUDIO_EFFECT_COMMAND_VDI_GET_CONFIG,
64     AUDIO_EFFECT_COMMAND_VDI_RESET,
65     AUDIO_EFFECT_COMMAND_VDI_ENABLE,
66     AUDIO_EFFECT_COMMAND_VDI_DISABLE,
67     AUDIO_EFFECT_COMMAND_VDI_SET_PARAM,
68     AUDIO_EFFECT_COMMAND_VDI_GET_PARAM,
69     AUDIO_EFFECT_COMMAND_VDI_BUTT,
70 };
71 
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 
76 #endif /* OHOS_VDI_AUDIO_EFFECTTYPES_H */