2019-05-31 11:09:32 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2009-02-28 06:43:04 +03:00
|
|
|
/*
|
2015-01-20 11:20:50 +03:00
|
|
|
* Line 6 Linux USB driver
|
2009-02-28 06:43:04 +03:00
|
|
|
*
|
2010-08-12 03:35:30 +04:00
|
|
|
* Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
|
2009-02-28 06:43:04 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MIDIBUF_H
|
|
|
|
#define MIDIBUF_H
|
|
|
|
|
2013-01-12 02:08:09 +04:00
|
|
|
struct midi_buffer {
|
2009-02-28 06:43:04 +03:00
|
|
|
unsigned char *buf;
|
|
|
|
int size;
|
|
|
|
int split;
|
|
|
|
int pos_read, pos_write;
|
|
|
|
int full;
|
|
|
|
int command_prev;
|
|
|
|
};
|
|
|
|
|
2013-01-12 02:08:09 +04: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 03:08:25 +04:00
|
|
|
int length);
|
2013-01-12 02:08:09 +04: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 03:35:30 +04:00
|
|
|
int length);
|
2009-02-28 06:43:04 +03:00
|
|
|
|
|
|
|
#endif
|