comparison vamp/vamp.h @ 160:e841e2365b48

* Some work on symbol visibility in the shared object
author cannam
date Thu, 03 Jul 2008 13:28:57 +0000
parents 933fee59d33a
children 7fc1041daa9d
comparison
equal deleted inserted replaced
159:64709b340651 160:e841e2365b48
310 /** Release a feature set returned from process or getRemainingFeatures. */ 310 /** Release a feature set returned from process or getRemainingFeatures. */
311 void (*releaseFeatureSet)(VampFeatureList *); 311 void (*releaseFeatureSet)(VampFeatureList *);
312 312
313 } VampPluginDescriptor; 313 } VampPluginDescriptor;
314 314
315
316 #ifdef __GNUC__
317 #pragma GCC visibility push(default)
318 #endif
319 #ifdef __MSVC__
320 __declspec(dllexport)
321 #endif
322
323
315 /** Get the descriptor for a given plugin index in this library. 324 /** Get the descriptor for a given plugin index in this library.
316 Return NULL if the index is outside the range of valid indices for 325 Return NULL if the index is outside the range of valid indices for
317 this plugin library. 326 this plugin library.
318 327
319 The hostApiVersion argument tells the library code the highest 328 The hostApiVersion argument tells the library code the highest
322 supported by the library that is no higher than that supported by 331 supported by the library that is no higher than that supported by
323 the host. Provided the descriptor has the correct vampApiVersion 332 the host. Provided the descriptor has the correct vampApiVersion
324 field for its actual compatibility level, the host should be able 333 field for its actual compatibility level, the host should be able
325 to do the right thing with it: use it if possible, discard it 334 to do the right thing with it: use it if possible, discard it
326 otherwise. 335 otherwise.
336
337 This is the only symbol that a Vamp plugin actually needs to
338 export from its shared object; all others can be hidden. See the
339 accompanying documentation for notes on how to achieve this with
340 certain compilers.
327 */ 341 */
328 const VampPluginDescriptor *vampGetPluginDescriptor 342 const VampPluginDescriptor *vampGetPluginDescriptor
329 (unsigned int hostApiVersion, unsigned int index); 343 (unsigned int hostApiVersion, unsigned int index);
330 344
345
346 #ifdef __GNUC__
347 #pragma GCC visibility pop
348 #endif
349
331 /** Function pointer type for vampGetPluginDescriptor. */ 350 /** Function pointer type for vampGetPluginDescriptor. */
332 typedef const VampPluginDescriptor *(*VampGetPluginDescriptorFunction) 351 typedef const VampPluginDescriptor *(*VampGetPluginDescriptorFunction)
333 (unsigned int, unsigned int); 352 (unsigned int, unsigned int);
334 353
335 #ifdef __cplusplus 354 #ifdef __cplusplus