jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.6KB

  1. /*
  2. * Copyright (c) 2007 Dmitry S. Baikov
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __jack_alsa_midi_impl_h__
  19. #define __jack_alsa_midi_impl_h__
  20. #ifdef JACKMP
  21. #include "types.h"
  22. #ifdef __cplusplus
  23. extern "C"
  24. {
  25. #endif
  26. int JACK_is_realtime(jack_client_t *client);
  27. int JACK_client_create_thread(jack_client_t *client, pthread_t *thread, int priority, int realtime, void *(*start_routine)(void*), void *arg);
  28. jack_port_t* JACK_port_register(jack_client_t *client, const char *port_name, const char *port_type, unsigned long flags, unsigned long buffer_size);
  29. int JACK_port_unregister(jack_client_t *, jack_port_t*);
  30. void* JACK_port_get_buffer(jack_port_t*, jack_nframes_t);
  31. int JACK_port_set_alias(jack_port_t* port, const char* name);
  32. jack_nframes_t JACK_get_sample_rate(jack_client_t *);
  33. jack_nframes_t JACK_frame_time(jack_client_t *);
  34. jack_nframes_t JACK_last_frame_time(jack_client_t *);
  35. #define jack_is_realtime JACK_is_realtime
  36. #define jack_client_create_thread JACK_client_create_thread
  37. #define jack_port_register JACK_port_register
  38. #define jack_port_unregister JACK_port_unregister
  39. #define jack_port_get_buffer JACK_port_get_buffer
  40. #define jack_port_set_alias JACK_port_set_alias
  41. #define jack_get_sample_rate JACK_get_sample_rate
  42. #define jack_frame_time JACK_frame_time
  43. #define jack_last_frame_time JACK_last_frame_time
  44. #ifdef __cplusplus
  45. } // extern "C"
  46. #endif
  47. #else // usual jack
  48. #include <jack/jack.h>
  49. #include <jack/thread.h>
  50. #endif
  51. #if defined(STANDALONE)
  52. #define MESSAGE(...) fprintf(stderr, __VA_ARGS__)
  53. #elif defined(JACKMP)
  54. #define MESSAGE(...) fprintf(stderr, __VA_ARGS__) ; fprintf(stderr, "\n")
  55. #else
  56. #include <jack/messagebuffer.h>
  57. #endif
  58. #define info_log(...) MESSAGE(__VA_ARGS__)
  59. #define error_log(...) MESSAGE(__VA_ARGS__)
  60. #ifdef DEBUG
  61. #define debug_log(...) MESSAGE(__VA_ARGS__)
  62. #else
  63. #define debug_log(...)
  64. #endif
  65. #include "alsa_midi.h"
  66. #endif /* __jack_alsa_midi_impl_h__ */