Fixed output level probe.
[cantaveria.git] / seq.h
blob40a7fc7e39728e4bbfe90df117be92e4305ad17b
1 /*
2 Cantaveria - action adventure platform game
3 Copyright (C) 2009 2010 Evan Rinehart
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to
18 The Free Software Foundation, Inc.
19 51 Franklin Street, Fifth Floor
20 Boston, MA 02110-1301, USA
22 evanrinehart@gmail.com
27 enum {
28 /* loader use */
29 EVX_ENDOFTRACK = 0x100,
30 EVX_META,
32 /* seq use */
33 EVX_TICKSPERBEAT,
34 EVX_TEMPOCHANGE,
35 EVX_LOOPSTART,
36 EVX_LOOPEND,
38 /* synth use */
39 EVX_MUSICVOLUME,
40 EVX_MUSICCUT,
41 EVX_FADEOUT,
42 EVX_FADECLEAR
45 typedef struct event event;
46 struct event {
47 int tick;
48 int type;
49 int chan;
50 int val1;
51 int val2;
54 void seq_init();
56 /* use these from audio thread */
57 event* seq_advance(int samples, int* used);
58 event* seq_get_immediate();
60 /***/
61 void seq_instant(int type, int chan, int val1, int val2);
62 void seq_clear();
63 void seq_load(list* events);
64 void seq_seek(list* target);
65 list* seq_tell();
66 void seq_enable();
67 void seq_disable();
68 void seq_append(event* e);