Lately I haven't had much time to code, but I have had much time to
think. What I've been thinking some about is DPS plugins.
What we want in the end is a DSP plugin interface that is capable of
alot of things:
1. Altering of the output buffer (I guess this is the simple part that
most settle with).
2. Resampling. Like using Secret Rabbit Code (
http://www.mega-nerd.com/
SRC/)
3. Channel modification. I.e. altering of stereo to multichannel.
4. etc etc
So, I came up with the following things for a DSP plugin to be able to
change:
1. Samplerate
2. Number of channels
3. Buffersize (length)
So this is probably not that hard. Lets just make a interface for
buffers, like a
class IBuffer{
long SampleRate();
void SetSampleRate(long sampleRate);
int Channels();
void SetChannels(int channels);
float* BufferPtr();
long Samples();
bool SetNOFSamples(long nofSamples);
}
The IDSP interface should have a method like
class IDSP{
bool RunDSP(const IBuffer *inputBuffer, IBuffer *outputBuffer);
}
This way the DSP will be able to change everything it needs to. By
default the outputBuffers settings could be the same as the
inputBuffers so that a simple DSP does only need to access the
BufferPtr.
Thinking about this some more, I realize that the exact same buffer
should be used for the decoders. The only difference is that they will
only use an outputBuffer. And the Output plugins (like waveout plugin)
should also get the same outputBuffer in the end.
Oh well... Just thought I'd share my ideas about the future :)
All comments are welcome.
Best regards
Daniel Önnerby (doep)