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.

91 lines
2.4KB

  1. /*
  2. Copyright (C) 2001 Paul Davis
  3. Copyright (C) 2004-2006 Grame
  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. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef __JackServer__
  17. #define __JackServer__
  18. #include "JackExports.h"
  19. #include "driver_interface.h"
  20. #include "JackDriverLoader.h"
  21. #include "jslist.h"
  22. namespace Jack
  23. {
  24. class JackGraphManager;
  25. class JackConnectionManager;
  26. class JackDriverClientInterface;
  27. class JackServerChannelInterface;
  28. class JackSyncInterface;
  29. struct JackEngineControl;
  30. class JackEngine;
  31. /*!
  32. \brief The Jack server.
  33. */
  34. class EXPORT JackServer
  35. {
  36. private:
  37. jack_driver_info_t* fDriverInfo;
  38. JackDriverClientInterface* fAudioDriver;
  39. JackDriverClientInterface* fFreewheelDriver;
  40. JackDriverClientInterface* fLoopbackDriver;
  41. JackEngine* fEngine;
  42. JackEngineControl* fEngineControl;
  43. JackGraphManager* fGraphManager;
  44. JackServerChannelInterface* fChannel;
  45. JackConnectionManager* fState;
  46. JackSynchro* fSynchroTable[CLIENT_NUM];
  47. bool fFreewheel;
  48. long fLoopback;
  49. public:
  50. JackServer(bool sync, bool temporary, long timeout, bool rt, long priority, long loopback, bool verbose);
  51. virtual ~JackServer();
  52. int Open(jack_driver_desc_t* driver_desc, JSList* driver_params);
  53. int Close();
  54. int Start();
  55. int Stop();
  56. int SetBufferSize(jack_nframes_t buffer_size);
  57. int SetFreewheel(bool onoff);
  58. void Notify(int refnum, int notify, int value);
  59. int InternalClientLoad(const char* client_name, const char* so_name, const char* objet_data, int options, int* int_ref, int* status);
  60. JackEngine* GetEngine();
  61. JackEngineControl* GetEngineControl();
  62. JackSynchro** GetSynchroTable();
  63. JackGraphManager* GetGraphManager();
  64. static JackServer* fInstance; // Unique instance
  65. };
  66. } // end of namespace
  67. #endif