#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
#include <stdio.h>

#define LIB_INSTANCE	HINSTANCE

#include "aeffect.h"

#include "portaudio.h"
char* My_Pa_GetErrorText(PaError errnum);
PaDeviceInfo* My_Pa_GetDeviceInfo(PaDeviceID device);

float vst_avg(float* blk, int sz);
void vst_gotinput(float* blk,int i);

void vst_set_samplerate(float samplerate, int blocksize);
AEffect * vst_get_plugin(char *fname, char **err);
int vst_is_vst2(AEffect *plug);
int vst_can_receive_midi(AEffect *plug);
int vst_can_send_midi(AEffect *plug);
void vst_do_process(AEffect *plug, float * infd, float * outfd, float * outfd2, int len, int enabled);
int vst_get_num_categories(AEffect *plug);
int vst_get_program_name(AEffect *plug, int category, int index, char s[25]);
int vst_get_param_name(AEffect *plug, int index, char s[25]);
int vst_get_param_label(AEffect *plug, int index, char s[25]);
int vst_get_param_display(AEffect *plug, int index, char s[25]);
int vst_get_product_string(AEffect *plug, char s[65]);
int vst_get_param_properties_isswitch(AEffect *plug, int index);
int vst_set_param(AEffect *plug, int index, float f);
float vst_get_param(AEffect *plug, int index);
int vst_send_midi(AEffect *plug, int chan, int pitch, long dur, int offvel);
int vst_set_program(AEffect *plug, int program);
int vst_is_synth(AEffect *plug);
int vst_can_midi_program_names(AEffect * plug);

