Collection of tools useful for audio production
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.

114 lines
3.4KB

  1. /*
  2. * Carla Backend
  3. * Copyright (C) 2011-2012 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the COPYING file
  16. */
  17. #ifndef CARLA_SHARED_H
  18. #define CARLA_SHARED_H
  19. #include "carla_backend.h"
  20. CARLA_BACKEND_START_NAMESPACE
  21. /*!
  22. * @defgroup CarlaBackendShared Carla Backend Shared Code
  23. *
  24. * @{
  25. */
  26. const char* BinaryType2str(const BinaryType type);
  27. const char* PluginType2str(const PluginType type);
  28. const char* PluginCategory2str(const PluginCategory category);
  29. const char* ParameterType2str(const ParameterType type);
  30. const char* InternalParametersIndex2str(const InternalParametersIndex index);
  31. const char* CustomDataType2str(const CustomDataType type);
  32. const char* GuiType2str(const GuiType type);
  33. const char* OptionsType2str(const OptionsType type);
  34. const char* CallbackType2str(const CallbackType type);
  35. const char* ProcessModeType2str(const ProcessModeType type);
  36. CustomDataType getCustomDataStringType(const char* const stype);
  37. const char* getCustomDataTypeString(const CustomDataType type);
  38. const char* getBinaryBidgePath(const BinaryType type);
  39. const char* getPluginTypeString(const PluginType type);
  40. void* getPointer(const uintptr_t addr);
  41. PluginCategory getPluginCategoryFromName(const char* const name);
  42. const char* getLastError();
  43. void setLastError(const char* const error);
  44. #ifndef BUILD_BRIDGE
  45. uint32_t getPluginHintsFromNative(const uint32_t nativeHints);
  46. void setOption(const OptionsType option, const int value, const char* const valueStr);
  47. void resetOptions();
  48. // Global options
  49. struct carla_options_t {
  50. ProcessModeType processMode;
  51. bool processHighPrecision;
  52. uint maxParameters;
  53. uint preferredBufferSize;
  54. uint preferredSampleRate;
  55. bool forceStereo;
  56. bool useDssiVstChunks;
  57. bool preferUiBridges;
  58. uint oscUiTimeout;
  59. const char* bridge_posix32;
  60. const char* bridge_posix64;
  61. const char* bridge_win32;
  62. const char* bridge_win64;
  63. const char* bridge_lv2gtk2;
  64. const char* bridge_lv2gtk3;
  65. const char* bridge_lv2qt4;
  66. const char* bridge_lv2x11;
  67. const char* bridge_vsthwnd;
  68. const char* bridge_vstx11;
  69. carla_options_t()
  70. : processMode(PROCESS_MODE_MULTIPLE_CLIENTS),
  71. processHighPrecision(false),
  72. maxParameters(MAX_PARAMETERS),
  73. preferredBufferSize(512),
  74. preferredSampleRate(44100),
  75. forceStereo(false),
  76. useDssiVstChunks(false),
  77. preferUiBridges(true),
  78. oscUiTimeout(4000/100),
  79. bridge_posix32(nullptr),
  80. bridge_posix64(nullptr),
  81. bridge_win32(nullptr),
  82. bridge_win64(nullptr),
  83. bridge_lv2gtk2(nullptr),
  84. bridge_lv2gtk3(nullptr),
  85. bridge_lv2qt4(nullptr),
  86. bridge_lv2x11(nullptr),
  87. bridge_vsthwnd(nullptr),
  88. bridge_vstx11(nullptr) {}
  89. };
  90. extern carla_options_t carlaOptions;
  91. #endif
  92. /**@}*/
  93. CARLA_BACKEND_END_NAMESPACE
  94. #endif // CARLA_SHARED_H