1 //------------------------------------------------------------------------
4 // Category : Interfaces
5 // Filename : pluginterfaces/vst/ivstprefetchablesupport.h
6 // Created by : Steinberg, 02/2015
7 // Description : VST Prefetchable Support Interface
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 //-----------------------------------------------------------------------------
19 #include "pluginterfaces/vst/vsttypes.h"
20 #include "pluginterfaces/vst/ivstattributes.h"
22 //------------------------------------------------------------------------
23 #include "pluginterfaces/base/falignpush.h"
24 //------------------------------------------------------------------------
26 //------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
31 /** \defgroup vst3typedef VST 3 Data Types */
33 //------------------------------------------------------------------------
34 /** Prefetchable Support Type */
35 typedef uint32 PrefetchableSupport
;
38 /** Prefetchable Support Enum */
39 enum ePrefetchableSupport
41 kIsNeverPrefetchable
= 0, ///< every instance of the plug does not support prefetch processing
42 kIsYetPrefetchable
, ///< in the current state the plug support prefetch processing
43 kIsNotYetPrefetchable
, ///< in the current state the plug does not support prefetch processing
44 kNumPrefetchableSupport
47 //------------------------------------------------------------------------
48 // IPrefetchableSupport Interface
49 //------------------------------------------------------------------------
50 /** Indicates that the plug-in could or not support Prefetch (dynamically): Vst::IPrefetchableSupport
51 \ingroup vstIPlug vst365
53 - [extends IComponent]
57 The plug-in should implement this interface if it needs to dynamically change between prefetchable or not.
58 By default (without implementing this interface) the host decides in which mode the plug-in is processed.
59 For more info about the prefetch processing mode check the ProcessModes::kPrefetch documentation.
61 \section IPrefetchableSupportExample Example
64 //------------------------------------------------------------------------
65 tresult PLUGIN_API myPlug::getPrefetchableSupport (PrefetchableSupport& prefetchable)
67 prefetchable = kIsNeverPrefetchable;
69 switch (myPrefetchableMode)
71 case 0: prefetchable = kIsNeverPrefetchable; break;
72 case 1: prefetchable = kIsYetPrefetchable; break;
73 case 2: prefetchable = kIsNotYetPrefetchable; break;
79 class IPrefetchableSupport
: public FUnknown
82 //------------------------------------------------------------------------
83 /** retrieve the current prefetch support. Use IComponentHandler::restartComponent
84 (kPrefetchableSupportChanged) to inform the host that this support has changed. */
85 virtual tresult PLUGIN_API
getPrefetchableSupport (PrefetchableSupport
& prefetchable
/*out*/) = 0;
87 //------------------------------------------------------------------------
88 static const FUID iid
;
91 DECLARE_CLASS_IID (IPrefetchableSupport
, 0x8AE54FDA, 0xE93046B9, 0xA28555BC, 0xDC98E21E)
93 //------------------------------------------------------------------------
95 } // namespace Steinberg
97 //------------------------------------------------------------------------
98 #include "pluginterfaces/base/falignpop.h"
99 //------------------------------------------------------------------------