]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/sys/linux/oss/include/midi_core.h
Various Mac OS X tweaks to get this to build. Probably breaking things.
[icculus/iodoom3.git] / neo / sys / linux / oss / include / midi_core.h
1 #ifndef MIDI_CORE_H
2 #define MIDI_CORE_H
3 /*
4  * Copyright by 4Front Technologies 1993-2004
5  *
6  * All rights reserved.
7  */
8
9 /*
10  * IMPORTANT NOTICE!
11  *
12  * This file contains internal structures used by Open Sound Systems.
13  * They will change without any notice between OSS versions. Care must be taken
14  * to make sure any software using this header gets properly re-compiled before
15  * use.
16  *
17  * 4Front Technologies (or anybody else) takes no responsibility of damages
18  * caused by use of this file.
19  */
20
21 struct midi_input_info
22 {                               /* MIDI input scanner variables */
23 #define MI_MAX  32
24   int m_busy;
25   unsigned char m_buf[MI_MAX];
26   unsigned char m_prev_status;  /* For running status */
27   int m_ptr;
28 #define MST_INIT                        0
29 #define MST_DATA                        1
30 #define MST_SYSEX                       2
31   int m_state;
32   int m_left;
33 };
34
35 typedef struct midi_operations
36 {
37   struct midi_info info;
38   struct synth_operations *converter;
39   struct midi_input_info in_info;
40   int (*open) (int dev, int mode,
41                void (*inputintr) (int dev, unsigned char data),
42                void (*outputintr) (int dev));
43   void (*close) (int dev);
44   int (*ioctl) (int dev, unsigned int cmd, ioctl_arg arg);
45   int (*outputc) (int dev, unsigned char data);
46   int (*start_read) (int dev);
47   int (*end_read) (int dev);
48   void (*kick) (int dev);
49   int (*command) (int dev, unsigned char *data);
50   int (*buffer_status) (int dev);
51   int (*prefix_cmd) (int dev, unsigned char status);
52   void (*input_callback) (int dev, unsigned char midich);
53   struct coproc_operations *coproc;
54   void *devc;
55   sound_os_info *osp;
56   int card_number;
57 #ifndef CONFIGURE_C
58   oss_mutex mutex;
59 #endif
60   unsigned long flags;
61 #define MFLAG_NOSEQUENCER               0x00000001 /* Not to be used by the sequencer driver */
62 } mididev_t, *mididev_p;
63
64 extern struct midi_operations **midi_devs;
65 extern int num_mididevs;
66 #endif