panic() cleanup.
[minix.git] / include / midiparser.h
blobe79768281af5a35f86bb28f11699211c5bf467c1
1 /*
2 * Purpose: Definitions for the MIDI message parser
3 */
4 /*
5 * This file is part of Open Sound System
7 * Copyright (C) 4Front Technologies 1996-2008.
9 * This software is released under the BSD license.
10 * See the COPYING file included in the main directory of this source
11 * distribution for the license terms and conditions
15 typedef struct midiparser_common midiparser_common_t, *midiparser_common_p;
17 #define CAT_VOICE 0
18 #define CAT_MTC 1
19 #define CAT_SYSEX 2
20 #define CAT_CHN 3
21 #define CAT_REALTIME 4
23 typedef void (*midiparser_callback_t) (void *context, int category,
24 unsigned char msg, unsigned char ch,
25 unsigned char *parms, int len);
26 typedef void (*midiparser_mtc_callback_t) (void *context,
27 oss_mtc_data_t * mtc);
29 extern midiparser_common_p midiparser_create (midiparser_callback_t callback,
30 void *comntext);
31 extern void midiparser_unalloc (midiparser_common_p common);
32 extern void midiparser_mtc_callback (midiparser_common_p common,
33 midiparser_mtc_callback_t callback);
35 extern void midiparser_input (midiparser_common_p common, unsigned char data);
36 extern void midiparser_input_buf (midiparser_common_p common,
37 unsigned char *data, int len);