头文件定义报错:error redefinition of 'xxx'
typedef struct wzmedia_echo_state
{char *obj_name;
unsigned samples_per_frame;
void *state;
short lat_ready; /* lat_buf has been filled in. */
struct frame lat_buf; /* Frame queue for lattency playback */
short *frm_buf;
unsigned int lat_time;
unsigned int played_time;
}wzmedia_echo_state;
重复定义错误,头文件修改后:
#ifndef _COMMON
#define _COMMON
typedef struct wzmedia_echo_state
{char *obj_name;
unsigned samples_per_frame;
void *state;
short lat_ready; /* lat_buf has been filled in. */
struct frame lat_buf; /* Frame queue for lattency playback */
short *frm_buf;
unsigned int lat_time;
unsigned int played_time;
}wzmedia_echo_state;
#endif