shithub: neindaw

ref: 9b3691b57b3fc854f77cffb8b9000efc13ee2087
dir: /piper/piper.h/

View raw version
typedef struct Cmd Cmd;
typedef struct Synth Synth;

enum {
	CmdNote,
	CmdVol,
	CmdRaw,
};

struct Cmd {
	int type;
	union {
		struct {
			float freq;
			float dur;
		}note[3];
		char *raw;
		float vol;
	};
	int numnotes;
};

struct Synth {
	char *name;
	int (*cmd)(void *aux, Cmd *c);
	void *(*alloc)(char *path);
};

extern Synth ay_3_8910;
extern Synth kick_drum;

int i36(uchar c);
float note2freq(int octave, uchar note);
int pathopen(char *path, char *fmt, ...);