comparison vamp-sdk/hostext/PluginBufferingAdapter.h @ 170:ff72d97823f7

* Add means to obtain actually used step & block sizes from buffering adapter
author cannam
date Fri, 25 Jul 2008 14:01:57 +0000
parents af8e59f43d1d
children dcc5df7e3253
comparison
equal deleted inserted replaced
169:af8e59f43d1d 170:ff72d97823f7
97 * not just its supposedly preferred one. 97 * not just its supposedly preferred one.
98 */ 98 */
99 size_t getPreferredBlockSize() const; 99 size_t getPreferredBlockSize() const;
100 100
101 /** 101 /**
102 * Initialise the adapter (and therefore the plugin) for the given
103 * number of channels. Initialise the adapter for the given step
104 * and block size, which must be equal.
105 *
106 * The step and block size used for the underlying plugin will
107 * depend on its preferences, or any values previously passed to
108 * setPluginStepSize and setPluginBlockSize.
109 */
110 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
111
112 /**
102 * Return the preferred step size of the plugin wrapped by this 113 * Return the preferred step size of the plugin wrapped by this
103 * adapter. 114 * adapter.
104 * 115 *
105 * This is included mainly for informational purposes. This value 116 * This is included mainly for informational purposes. This value
106 * is not likely to be a valid step size for the adapter itself, 117 * is not likely to be a valid step size for the adapter itself,
136 * before the first call to initialise(). 147 * before the first call to initialise().
137 */ 148 */
138 void setPluginBlockSize(size_t blockSize); 149 void setPluginBlockSize(size_t blockSize);
139 150
140 /** 151 /**
141 * Initialise the adapter (and therefore the plugin) for the given 152 * Return the step and block sizes that were actually used when
142 * number of channels. Initialise the adapter for the given step 153 * initialising the underlying plugin.
143 * and block size, which must be equal.
144 * 154 *
145 * The step and block size used for the underlying plugin will 155 * This is included mainly for informational purposes. You will
146 * depend on its preferences, or any values previously passed to 156 * not usually need to call this function. If this is called
147 * setPluginStepSize and setPluginBlockSize. 157 * before initialise(), it will return 0 for both values. If it
158 * is called after a failed call to initialise(), it will return
159 * the values that were used in the failed call to the plugin's
160 * initialise() function.
148 */ 161 */
149 bool initialise(size_t channels, size_t stepSize, size_t blockSize); 162 void getActualStepAndBlockSizes(size_t &stepSize, size_t &blockSize);
150 163
151 OutputList getOutputDescriptors() const; 164 OutputList getOutputDescriptors() const;
152 165
153 void reset(); 166 void reset();
154 167