#ifndef GENLIB_COMMON_H
#define GENLIB_COMMON_H 1
#include "genlib_common_win.h"
#define DSP_GEN_MAX_SIGNALS 16
#ifdef GENLIB_USE_DOUBLE
typedef double t_sample;
#else
typedef float t_sample;
#endif
typedef float t_param;
typedef char *t_ptr;
typedef long t_genlib_err;
typedef enum {
GENLIB_ERR_NONE = 0, GENLIB_ERR_GENERIC = -1, GENLIB_ERR_INVALID_PTR = -2, GENLIB_ERR_DUPLICATE = -3, GENLIB_ERR_OUT_OF_MEM = -4,
GENLIB_ERR_LOOP_OVERFLOW = 100, GENLIB_ERR_NULL_BUFFER = 101
} e_genlib_errorcodes;
typedef enum {
GENLIB_PARAMTYPE_FLOAT = 0,
GENLIB_PARAMTYPE_SYM = 1
} e_genlib_paramtypes;
struct ParamInfo
{
t_param defaultvalue;
void * defaultref;
char hasinputminmax;
char hasminmax;
t_param inputmin, inputmax;
t_param outputmin, outputmax;
const char *name;
const char *units;
int paramtype; t_param exp; };
struct CommonState
{
t_sample sr;
int vs;
int numins;
int numouts;
const char **inputnames;
const char **outputnames;
int numparams;
ParamInfo *params;
void * parammap; void * api; };
typedef struct _genlib_buffer t_genlib_buffer;
typedef struct {
char b_name[256]; float *b_samples; long b_frames; long b_nchans; long b_size; float b_sr; long b_modtime; long b_rfu[57]; } t_genlib_buffer_info;
typedef struct _genlib_data t_genlib_data;
typedef struct {
int dim, channels;
t_sample * data;
} t_genlib_data_info;
typedef void (*setparameter_method) (CommonState *, long, t_param, void *);
typedef void (*getparameter_method) (CommonState *, long, t_param *);
#endif