public Signal Apply(Signal signal)
{
// check pixel format of the source signal
CheckSourceFormat(signal.SampleFormat);
// get number of channels and samples
int channels = signal.Channels;
int samples = signal.Length;
// retrieve other information
int rate = signal.SampleRate;
// destination sample format
SampleFormat dstSampleFormat = FormatTranslations[signal.SampleFormat];
// create new signal of required format
Signal dstSignal = NewSignal(channels, samples, rate, dstSampleFormat);
// process the filter
ProcessFilter(signal, dstSignal);
// return the processed signal
return dstSignal;
}