A Voice Processor class.
A virtual base class for a voice manager implementation.
The idea behind this class is to make it easier to support either single precision or double precision samples (float or double) or different channel layouts.
Example:
class MySynthProcessor : public AudioEffect
{
public:
protected:
};
tresult PLUGIN_API MySynthProcessor::setActive (
TBool state)
{
if (state)
{
if (processSetup.symbolicSampleSize ==
kSample32)
voiceProcessor =
new VoiceProcessorImplementation<float, Voice<float>, 2,
MAX_VOICES,
void> (processSetup.sampleRate, 0);
else if (processSetup.symbolicSampleSize ==
kSample64)
voiceProcessor =
new VoiceProcessorImplementation<double, Voice<double>, 2,
MAX_VOICES,
void> (processSetup.sampleRate, 0);
else
}
else
{
delete voiceProcessor;
voiceProcessor = 0;
}
}
tresult PLUGIN_API MySynthProcessor::process (ProcessData& data)
{
return voiceProcessor->process (data);
}
virtual tresult process(ProcessData &data)=0
VoiceProcessor()
Definition: voiceprocessor.h:111
#define MAX_VOICES
Definition: note_expression_synth_controller.h:48
- See also
- Steinberg::Vst::VoiceProcessorImplementation