2009-02-27 20:43:04 -07:00
|
|
|
/*
|
2010-08-22 17:08:25 -06:00
|
|
|
* Line6 Linux USB driver - 0.9.1beta
|
2009-02-27 20:43:04 -07:00
|
|
|
*
|
2010-08-11 17:35:30 -06:00
|
|
|
* Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
|
2009-02-27 20:43:04 -07:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation, version 2.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MIDIBUF_H
|
|
|
|
#define MIDIBUF_H
|
|
|
|
|
2009-02-27 22:09:55 -07:00
|
|
|
struct MidiBuffer {
|
2009-02-27 20:43:04 -07:00
|
|
|
unsigned char *buf;
|
|
|
|
int size;
|
|
|
|
int split;
|
|
|
|
int pos_read, pos_write;
|
|
|
|
int full;
|
|
|
|
int command_prev;
|
|
|
|
};
|
|
|
|
|
2010-08-11 17:35:30 -06:00
|
|
|
extern int line6_midibuf_bytes_used(struct MidiBuffer *mb);
|
|
|
|
extern int line6_midibuf_bytes_free(struct MidiBuffer *mb);
|
|
|
|
extern void line6_midibuf_destroy(struct MidiBuffer *mb);
|
|
|
|
extern int line6_midibuf_ignore(struct MidiBuffer *mb, int length);
|
|
|
|
extern int line6_midibuf_init(struct MidiBuffer *mb, int size, int split);
|
2010-08-22 17:08:25 -06:00
|
|
|
extern int line6_midibuf_read(struct MidiBuffer *mb, unsigned char *data,
|
|
|
|
int length);
|
2010-08-11 17:35:30 -06:00
|
|
|
extern void line6_midibuf_reset(struct MidiBuffer *mb);
|
2010-08-22 17:08:25 -06:00
|
|
|
extern int line6_midibuf_skip_message(struct MidiBuffer *mb,
|
|
|
|
unsigned short mask);
|
2010-08-11 17:35:30 -06:00
|
|
|
extern void line6_midibuf_status(struct MidiBuffer *mb);
|
|
|
|
extern int line6_midibuf_write(struct MidiBuffer *mb, unsigned char *data,
|
|
|
|
int length);
|
2009-02-27 20:43:04 -07:00
|
|
|
|
|
|
|
#endif
|