The filter_plugin_ops structure

The filter_plugin_ops structure that is returned by the Instantiate_Plugin function and defines an instance of a filter plugin, is defined as:
 typedef void		op_filter_filechange(void*, char *name);
 typedef status_t	op_filter_filter(void*, short *buffer,int32 framecount, filter_info *info);
 typedef status_t	op_filter_filter_float(void*, float **input, float **output, int32 framecount, filter_info *info);
 typedef BView*		op_filter_configure(void*);
 typedef void		op_filter_setconfig(void*,BMessage *config);
 typedef void		op_filter_getconfig(void*,BMessage *config);

 typedef struct filter_plugin_ops
 {
	uint32				ops_magic;	// magic number
	uint32				ops_version;	// version of this plugin structure

	op_filter_filechange		(*FileChange);	// leave NULL if not implemented
	op_filter_filter		(*Filter);	// leave NULL if you implement FilterFloat
	op_filter_configure		(*Configure);	// leave NULL if no run-time config
	op_filter_setconfig		(*SetConfig);	// leave NULL if no run-time config
	op_filter_getconfig		(*GetConfig);	// leave NULL if no run-time config
	op_filter_filter_float		(*FilterFloat); // leave NULL if you implement Filter
 } filter_plugin_ops;
The void* that all of the functions receive as their first argument is the pointer that was filled in by the Instantiate_Plugin function. The filter_info structure that is passed to the filter functions is defined as:
typedef struct filter_info
{
	float pitch;
	float volume;

} filter_info;
The filter_info structure gives information about the first track in SoundPlay only.


Copyright © 1999 Marco Nelissen