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.

100 lines
3.9KB

  1. //------------------------------------------------------------------------
  2. // Project : VST SDK
  3. //
  4. // Category : Interfaces
  5. // Filename : pluginterfaces/vst/ivstprefetchablesupport.h
  6. // Created by : Steinberg, 02/2015
  7. // Description : VST Prefetchable Support Interface
  8. //
  9. //-----------------------------------------------------------------------------
  10. // This file is part of a Steinberg SDK. It is subject to the license terms
  11. // in the LICENSE file found in the top-level directory of this distribution
  12. // and at www.steinberg.net/sdklicenses.
  13. // No part of the SDK, including this file, may be copied, modified, propagated,
  14. // or distributed except according to the terms contained in the LICENSE file.
  15. //-----------------------------------------------------------------------------
  16. #pragma once
  17. #include "pluginterfaces/vst/vsttypes.h"
  18. #include "pluginterfaces/vst/ivstattributes.h"
  19. //------------------------------------------------------------------------
  20. #include "pluginterfaces/base/falignpush.h"
  21. //------------------------------------------------------------------------
  22. //------------------------------------------------------------------------
  23. namespace Steinberg {
  24. namespace Vst {
  25. // ------------------------------------------------------------------------
  26. /** \defgroup vst3typedef VST 3 Data Types */
  27. /*@{*/
  28. //------------------------------------------------------------------------
  29. /** Prefetchable Support Type */
  30. typedef uint32 PrefetchableSupport;
  31. /*@}*/
  32. /** Prefetchable Support Enum */
  33. enum ePrefetchableSupport
  34. {
  35. kIsNeverPrefetchable = 0, ///< every instance of the plug does not support prefetch processing
  36. kIsYetPrefetchable, ///< in the current state the plug support prefetch processing
  37. kIsNotYetPrefetchable, ///< in the current state the plug does not support prefetch processing
  38. kNumPrefetchableSupport
  39. };
  40. //------------------------------------------------------------------------
  41. // IPrefetchableSupport Interface
  42. //------------------------------------------------------------------------
  43. /** Indicates that the plug-in could or not support Prefetch (dynamically): Vst::IPrefetchableSupport
  44. \ingroup vstIPlug vst365
  45. - [plug imp]
  46. - [extends IComponent]
  47. - [released: 3.6.5]
  48. - [optional]
  49. The plug-in should implement this interface if it needs to dynamically change between prefetchable or not.
  50. By default (without implementing this interface) the host decides in which mode the plug-in is processed.
  51. For more info about the prefetch processing mode check the ProcessModes::kPrefetch documentation.
  52. \section IPrefetchableSupportExample Example
  53. \code{.cpp}
  54. //------------------------------------------------------------------------
  55. tresult PLUGIN_API myPlug::getPrefetchableSupport (PrefetchableSupport& prefetchable)
  56. {
  57. prefetchable = kIsNeverPrefetchable;
  58. switch (myPrefetchableMode)
  59. {
  60. case 0: prefetchable = kIsNeverPrefetchable; break;
  61. case 1: prefetchable = kIsYetPrefetchable; break;
  62. case 2: prefetchable = kIsNotYetPrefetchable; break;
  63. }
  64. return kResultOk;
  65. }
  66. \endcode
  67. */
  68. class IPrefetchableSupport : public FUnknown
  69. {
  70. public:
  71. //------------------------------------------------------------------------
  72. /** retrieve the current prefetch support. Use IComponentHandler::restartComponent
  73. (kPrefetchableSupportChanged) to inform the host that this support has changed. */
  74. virtual tresult PLUGIN_API getPrefetchableSupport (PrefetchableSupport& prefetchable /*out*/) = 0;
  75. //------------------------------------------------------------------------
  76. static const FUID iid;
  77. };
  78. DECLARE_CLASS_IID (IPrefetchableSupport, 0x8AE54FDA, 0xE93046B9, 0xA28555BC, 0xDC98E21E)
  79. //------------------------------------------------------------------------
  80. } // namespace Vst
  81. } // namespace Steinberg
  82. //------------------------------------------------------------------------
  83. #include "pluginterfaces/base/falignpop.h"
  84. //------------------------------------------------------------------------