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