2009-02-28 03:43:04 +00:00
|
|
|
/*
|
2015-01-20 08:20:50 +00:00
|
|
|
* Line 6 Linux USB driver
|
2009-02-28 03:43:04 +00:00
|
|
|
*
|
2010-08-11 23:35:30 +00:00
|
|
|
* Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
|
2009-02-28 03:43:04 +00: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
|
|
|
|
|
2013-01-11 22:08:09 +00:00
|
|
|
struct midi_buffer {
|
2009-02-28 03:43:04 +00:00
|
|
|
unsigned char *buf;
|
|
|
|
int size;
|
|
|
|
int split;
|
|
|
|
int pos_read, pos_write;
|
|
|
|
int full;
|
|
|
|
int command_prev;
|
|
|
|
};
|
|
|
|
|
2013-01-11 22:08:09 +00:00
|
|
|
extern int line6_midibuf_bytes_used(struct midi_buffer *mb);
|
|
|
|
extern int line6_midibuf_bytes_free(struct midi_buffer *mb);
|
|
|
|
extern void line6_midibuf_destroy(struct midi_buffer *mb);
|
|
|
|
extern int line6_midibuf_ignore(struct midi_buffer *mb, int length);
|
|
|
|
extern int line6_midibuf_init(struct midi_buffer *mb, int size, int split);
|
|
|
|
extern int line6_midibuf_read(struct midi_buffer *mb, unsigned char *data,
|
2010-08-22 23:08:25 +00:00
|
|
|
int length);
|
2013-01-11 22:08:09 +00:00
|
|
|
extern void line6_midibuf_reset(struct midi_buffer *mb);
|
|
|
|
extern int line6_midibuf_write(struct midi_buffer *mb, unsigned char *data,
|
2010-08-11 23:35:30 +00:00
|
|
|
int length);
|
2009-02-28 03:43:04 +00:00
|
|
|
|
|
|
|
#endif
|