2 * Purpose: Definitions for the MIDI message parser
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
;
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
,
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
);