/*
|
* 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_ */
|