qipp
2025-11-07 744722688187eb4991c72464e2bb5e06b244fee7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
/*
 * scene.h
 * Description:
 *
 *  Created on: 2014-10-28
 *      Author: Graydon
 *  Modify:
 */
 
#ifndef SCENE_H_
#define SCENE_H_
 
#include "protocol.h"
 
 
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[MAX_INPUT_NUM];
    unsigned int il_id[MAX_INPUT_NUM];
    
    void*  param_ptr;    
    struct{
        unsigned int mute;
        float    gain;
        float   old_gain;
        float   step_gain;
        int        delay;
        void*   hgen;
        int     type;
        int     time;
        int     phase;
        void*     hExpander;
    }input[MAX_INPUT_NUM];    
}input_handle,*pinput_handle;
 
 
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[MAX_OUTPUT_NUM];
    unsigned int il_id[MAX_OUTPUT_NUM];
 
    void*  param_ptr;
    struct{
        unsigned int mute;
        float old_gain;
        float gain;
        float   step_gain;
        int     time;
        int     phase;
    }output[MAX_OUTPUT_NUM];
}output_handle,*poutput_handle;
 
 
typedef struct{
    unsigned int input_num;
    unsigned int il_id[MAX_DELIM_LEN];
 
    unsigned int meter_num;
    unsigned int period[MAX_OUTPUT_NUM]; //Éϱ¨ÖÜÆÚ,ÒÔ֡Ϊµ¥Î»
    //float old_level[MAX_INPUT_NUM];
    short*  level; //Ö¸Ïòµçƽbuf
    void*  param_ptr;
    float   maxLevel[MAX_INPUT_NUM];
}meter_handle,*pmeter_handle;
 
 
typedef struct{
    unsigned int bypass;
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[1];
    unsigned int il_id[1];
    void* halg;
    void*  param_ptr;
    short* level;
    unsigned int period; //Éϱ¨ÖÜÆÚ,ÒÔ֡Ϊµ¥Î»
    //int  channel;
}eq_handle,*peq_handle
,delay_handle,*pdelay_handle
,compressor_handle,*pcompressor_handle
,expander_handle,*pexpander_handle
,feedback_handle,*pfeedback_handle
,shelf_handle,*pshelf_handle
,agc_handle,*pagc_handle
,common_handle,*pcommon_handle;
 
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[1];
    unsigned int il_id[1];
    float  gain;
    float  old_gain;
    void*  param_ptr;
}gain_handle,*pgain_handle;
 
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[MAX_OUTPUT_NUM];
    unsigned int il_id[MAX_OUTPUT_NUM];
    float  gain;
    int mute;
    int time;//fader in out time(ms)
    float  old_gain[MAX_OUTPUT_NUM];
    float  step_gain[MAX_OUTPUT_NUM];
    void*  param_ptr;
}sysctl_handle,*psysctl_handle;
 
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    
    unsigned int ol_id[2];
    unsigned int il_id[2];
    
    unsigned int bypass;
    void*  param_ptr;
    void* halg;
}aec_handle,*paec_handle,
ans_handle,*pans_handle;
 
typedef struct{
    unsigned int lowbypass;
    unsigned int highbypass;
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[1];
    unsigned int il_id[1];
    void* hLowalg;
    void* hHighalg;
    void*  param_ptr;
}crossover_handle,*pcrossover_handle;
 
#if 0
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[MAX_MIXER_OUTPUT];
    unsigned int il_id[MAX_MIXER_INPUT];
 
    void*  param_ptr;
    short mask[MAX_MIXER_OUTPUT][(MAX_MIXER_INPUT+15)/16];
    float weight[MAX_MIXER_OUTPUT];
    float *gain ;//[MAX_MIXER_OUTPUT][MAX_MIXER_INPUT];
    float *step;
}mixer_handle,*pmixer_handle;
#else
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[MAX_MIXER_OUTPUT];
    unsigned int il_id[MAX_MIXER_INPUT];
 
    void*  param_ptr;
    short mask[MAX_MIXER_OUTPUT][(MAX_MIXER_INPUT+15)/16];
    float gain [MAX_MIXER_OUTPUT][MAX_MIXER_INPUT];
}mixer_handle,*pmixer_handle;
#endif
 
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[MAX_MIXER_OUTPUT];
    unsigned int il_id[MAX_MIXER_INPUT];
 
    void*  param_ptr;
    short mask[MAX_MIXER_OUTPUT][(MAX_MIXER_INPUT+15)/16];
}selector_handle,*pselector_handle;
 
 
typedef struct{
    unsigned int input_num;
    unsigned int output_num;
    unsigned int ol_id[AUTOMIXER_CHANNEL_NUM+1];
    unsigned int il_id[AUTOMIXER_CHANNEL_NUM];
    
    unsigned int bypass;
    void* halg;
    void* param_ptr;
    
    short* level;
    unsigned int period;     
}automixer_handle,*pautomixer_handle;
 
 
 
/*description: ³¡¾°·ÖÎö£¬ÓÃÓÚ´ÓÍⲿ£¨arm£¬pc£©»ñÈ¡µ½µÄ³¡¾°Îļþ½âÎöµ½dspÿ¸ö´¦ÀíÄ£¿é
 *@param1:
 *@param2:
 *@param3:
 *@param4:
 *return: none
 */
void scene_analyze(void); 
 
/*description: ½âÎöºóµÄ³¡¾°Ö´ÐдÓÍ·µ½Î²Ö´ÐÐÒ»´Î
 *@param1:
 *@param2:
 *@param3:
 *@param4:
 *return: none
 */
void scene_running(void);
 
/*description: Ã¿¸öÄ£¿éµÄ²ÎÊý¿ØÖƺ¯Êý
 *@param1:Ä£¿éID
 *@param2:¾ßÌ嵽ÿ¸öÄ£¿éµÄÃüÁîÀàÐÍ
 *@param3:ÃüÁî
 *@param4:Êý¾Ý³¤¶È
 *return: 
 */
int scene_ctrl(int proc_id,int cmd,int* val,int num);
 
/*description: Ã¿¸öÄ£¿éµÄ²ÎÊý¿½±´
 *@param1:Ä£¿éID
 *@param2:²ÎÊý
 *@param3:Êý¾Ý³¤¶È
 *@param4:
 *return: 
 */
int scene_cpy(int npkt,const void* param,int size);
 
void scene_destroy(void);
 
int GetLevelPtr(short** ptr);
 
void LevelEmpty(void);
 
void scene_default(void);
 
void topo_analize(short* bin, int file_size);
 
int scene_channel_copy(ptag_channel_copy pchannels);
 
#endif /* SCENE_H_ */