Fixed a unused result warning.
[cantaveria.git] / orc.h
blob01e6a6b0bdfd8b924a08d7cdfd0c042a7716c75d
1 /*
2 orc.c
3 various software synths and samples
5 Copyright (C) 2009 Evan Rinehart
7 This software comes with no warranty.
8 1. This software can be used for any purpose, good or evil.
9 2. Modifications must retain this license, at least in spirit.
12 #define PI 3.1415926535897931
13 #define PI2 2*PI
15 enum {
16 EV_NOTEON = 0x90,
17 EV_NOTEOFF = 0x80,
18 EV_CONTROLLER = 0xC0,
19 EV_PITCHBEND = 0xE0
22 typedef void (*mix_callback)(void* data, float out[], int count);
23 typedef void (*control_callback)(void* data, int type, int val1, int val2, int val);
24 typedef void (*cleanup_callback)(void* data);
26 typedef struct {
27 mix_callback mix;
28 control_callback control;
29 cleanup_callback cleanup;
30 void* data;
31 } instrument;
33 enum instrument_name {
34 ORC_DEFAULT,
35 ORC_KARPLUS,
36 ORC_UNKNOWN
41 instrument orc_load(enum instrument_name name);
42 void orc_init(int sample_rate);