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