comparison vamp-sdk/Plugin.h @ 8:c4662bbef275

* Allow plugins to return 0 for preferred block/step size to accept a host default
author cannam
date Mon, 03 Apr 2006 14:19:02 +0000
parents 8f10d35a4090
children 44113b1e296b
comparison
equal deleted inserted replaced
7:c66551966b5f 8:c4662bbef275
150 * will either let the user do so, or will use a Hanning window. 150 * will either let the user do so, or will use a Hanning window.
151 */ 151 */
152 virtual InputDomain getInputDomain() const = 0; 152 virtual InputDomain getInputDomain() const = 0;
153 153
154 /** 154 /**
155 * Get the preferred block size (window size -- the number of
156 * sample frames passed in each block to the process() function).
157 * This should be called before initialise().
158 *
159 * A plugin that can handle any block size may return 0. The
160 * final block size will be set in the initialise() call.
161 */
162 virtual size_t getPreferredBlockSize() const { return 0; }
163
164 /**
155 * Get the preferred step size (window increment -- the distance 165 * Get the preferred step size (window increment -- the distance
156 * in sample frames between the start frames of consecutive blocks 166 * in sample frames between the start frames of consecutive blocks
157 * passed to the process() function) for the plugin. This should 167 * passed to the process() function) for the plugin. This should
158 * be called before initialise(). 168 * be called before initialise().
159 */ 169 *
160 virtual size_t getPreferredStepSize() const = 0; 170 * A plugin may return 0 if it has no particular interest in the
161 171 * step size. In this case, the host should make the step size
162 /** 172 * equal to the block size if the plugin is accepting input in the
163 * Get the preferred block size (window size -- the number of 173 * time domain. If the plugin is accepting input in the frequency
164 * sample frames passed in each block to the process() function). 174 * domain, the host may use any step size. The final step size
165 * This should be called before initialise(). 175 * will be set in the initialise() call.
166 */ 176 */
167 virtual size_t getPreferredBlockSize() const { return getPreferredStepSize(); } 177 virtual size_t getPreferredStepSize() const { return 0; }
168 178
169 /** 179 /**
170 * Get the minimum supported number of input channels. 180 * Get the minimum supported number of input channels.
171 */ 181 */
172 virtual size_t getMinChannelCount() const { return 1; } 182 virtual size_t getMinChannelCount() const { return 1; }