Audio plugin host https://kx.studio/carla
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.

jclient.h 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // ----------------------------------------------------------------------
  2. //
  3. // Copyright (C) 2010 Fons Adriaensen <fons@linuxaudio.org>
  4. // Modified by falkTX on Jan 2015 for inclusion in Carla
  5. //
  6. // This program is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // the Free Software Foundation; either version 2 of the License, or
  9. // (at your option) any later version.
  10. //
  11. // This program is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with this program; if not, write to the Free Software
  18. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. //
  20. // ----------------------------------------------------------------------
  21. #ifndef __JCLIENT_H
  22. #define __JCLIENT_H
  23. #include <clthreads.h>
  24. #include "CarlaNativeJack.h"
  25. #include "global.h"
  26. #include "reverb.h"
  27. namespace REV1 {
  28. class Jclient : public A_thread
  29. {
  30. public:
  31. Jclient (const char *jname, jack_client_t *jclient, bool ambis);
  32. ~Jclient (void);
  33. const char *jname (void) const { return _jname; }
  34. Reverb *reverb (void) const { return (Reverb *) &_reverb; }
  35. private:
  36. void init_jack (const char *jname);
  37. void close_jack (void);
  38. void jack_shutdown (void);
  39. int jack_process (int nframes);
  40. virtual void thr_main (void) {}
  41. jack_client_t *_jack_client;
  42. jack_port_t *_inpports [2];
  43. jack_port_t *_outports [4];
  44. bool _active;
  45. const char *_jname;
  46. unsigned int _fsamp;
  47. bool _ambis;
  48. int _fragm;
  49. int _nsamp;
  50. Reverb _reverb;
  51. static void jack_static_shutdown (void *arg);
  52. static int jack_static_process (jack_nframes_t nframes, void *arg);
  53. };
  54. }
  55. #endif