midibuf.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Line 6 Linux USB driver
  3. *
  4. * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation, version 2.
  9. *
  10. */
  11. #ifndef MIDIBUF_H
  12. #define MIDIBUF_H
  13. struct midi_buffer {
  14. unsigned char *buf;
  15. int size;
  16. int split;
  17. int pos_read, pos_write;
  18. int full;
  19. int command_prev;
  20. };
  21. extern int line6_midibuf_bytes_used(struct midi_buffer *mb);
  22. extern int line6_midibuf_bytes_free(struct midi_buffer *mb);
  23. extern void line6_midibuf_destroy(struct midi_buffer *mb);
  24. extern int line6_midibuf_ignore(struct midi_buffer *mb, int length);
  25. extern int line6_midibuf_init(struct midi_buffer *mb, int size, int split);
  26. extern int line6_midibuf_read(struct midi_buffer *mb, unsigned char *data,
  27. int length);
  28. extern void line6_midibuf_reset(struct midi_buffer *mb);
  29. extern int line6_midibuf_write(struct midi_buffer *mb, unsigned char *data,
  30. int length);
  31. #endif