2 * OSS compatible sequencer driver
4 * seq_oss_event.h - OSS event queue record
6 * Copyright (C) 1998,99 Takashi Iwai <tiwai@suse.de>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __SEQ_OSS_EVENT_H
24 #define __SEQ_OSS_EVENT_H
26 #include "seq_oss_device.h"
28 #define SHORT_EVENT_SIZE 4
29 #define LONG_EVENT_SIZE 8
31 /* short event (4bytes) */
39 /* short note events (4bytes) */
47 /* long timer events (8bytes) */
51 unsigned char dummy1, dummy2;
55 /* long extended events (8bytes) */
56 struct evrec_extended {
61 unsigned char p1, p2, p3, p4;
64 /* long channel events (8bytes) */
74 /* channel voice events (8bytes) */
80 unsigned char note, parm;
84 /* sysex events (8bytes) */
98 struct evrec_extended e;
101 unsigned char c[LONG_EVENT_SIZE];
104 #define ev_is_long(ev) ((ev)->s.code >= 128)
105 #define ev_length(ev) ((ev)->s.code >= 128 ? LONG_EVENT_SIZE : SHORT_EVENT_SIZE)
107 int snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
108 int snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *q);
109 int snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
112 #endif /* __SEQ_OSS_EVENT_H */