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.

87 lines
2.4KB

  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. #endif
  25. int JACK_is_realtime(jack_client_t *client);
  26. int JACK_client_create_thread(jack_client_t *client, pthread_t *thread, int priority, int realtime, void *(*start_routine)(void*), void *arg);
  27. 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);
  28. int JACK_port_unregister(jack_client_t *, jack_port_t*);
  29. void* JACK_port_get_buffer(jack_port_t*, jack_nframes_t);
  30. jack_nframes_t JACK_get_sample_rate(jack_client_t *);
  31. jack_nframes_t JACK_frame_time(jack_client_t *);
  32. jack_nframes_t JACK_last_frame_time(jack_client_t *);
  33. #define jack_is_realtime JACK_is_realtime
  34. #define jack_client_create_thread JACK_client_create_thread
  35. #define jack_port_register JACK_port_register
  36. #define jack_port_unregister JACK_port_unregister
  37. #define jack_port_get_buffer JACK_port_get_buffer
  38. #define jack_get_sample_rate JACK_get_sample_rate
  39. #define jack_frame_time JACK_frame_time
  40. #define jack_last_frame_time JACK_last_frame_time
  41. #ifdef __cplusplus
  42. } // extern "C"
  43. #endif
  44. #else // usual jack
  45. #include <jack/jack.h>
  46. #include <jack/thread.h>
  47. #endif
  48. #if defined(STANDALONE)
  49. #define MESSAGE(...) fprintf(stderr, __VA_ARGS__)
  50. #elif defined(JACKMP)
  51. #define MESSAGE(...) fprintf(stderr, __VA_ARGS__)
  52. #else
  53. #include <jack/messagebuffer.h>
  54. #endif
  55. #define info_log(...) MESSAGE(__VA_ARGS__)
  56. #define error_log(...) MESSAGE(__VA_ARGS__)
  57. #ifdef DEBUG
  58. #define debug_log(...) MESSAGE(__VA_ARGS__)
  59. #else
  60. #define debug_log(...)
  61. #endif
  62. #include "alsa_midi.h"
  63. #endif /* __jack_alsa_midi_impl_h__ */