#ifndef SYNTH_SHED_H #define SYNTH_SHED_H #ifdef __cplusplus extern "C" { #endif // Types (as forward declarations) // != 0 means ERR typedef int SYNTH_STATUS; typedef struct _synth synth_t; typedef synth_t synth; // Enums typedef enum _filtertype { HPF, LPF, BPF } filtertype_t; typedef enum _tech { ANALOG, DIGITAL } tech_t; // Structs typedef struct _filter { tech_t technology; filtertype_t type; } filter_t; struct _synth { const char* brand; const char* model; int osc_count; tech_t technology; filter_t filter[3]; }; // Functions void init_synth_shed(); synth_t* synth_create(const char* brand, const char* model, int osc_count); // This function covers the problem of a pointer to pointer arg SYNTH_STATUS synth_create_pp(synth_t** new_synth); SYNTH_STATUS synth_set_osc_count(synth_t* synth, int osc_count); //SYNTH_STATUS synth_set_filter(synth_t* synth, filter_t* filt); //SYNTH_STATUS synth_set_tech(synth_t* synth, tech_t tech); const char* tech_to_string(const enum _tech* tech); const char* filtertype_to_string(const filtertype_t* filt); const char* play_synth(synth_t* synth); #ifdef __cplusplus } // extern "C" #endif #endif //SYNTH_SHED_H