Tak jak pise mike.pr to jde, ale jak sam pise, (L-R)/2 je celkem spatny filtr..
Vsak muzete zkusit...upravil jsem priklad z FMOD Ex baliku pro tento pripad.

Kód:
FMOD_RESULT F_CALLBACK myDSPCallback(FMOD_DSP_STATE *dsp_state, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels)
{
unsigned int count, userdata;
int count2;
char name[256];
float diff = 0.0f;
FMOD_DSP *thisdsp = dsp_state->instance;
/*
This redundant call just shows using the instance parameter of FMOD_DSP_STATE and using it to
call a DSP information function.
*/
FMOD_DSP_GetInfo(thisdsp, name, 0, 0, 0, 0);
FMOD_DSP_GetUserData(thisdsp, (void **)&userdata);
/*
This loop assumes inchannels = outchannels, which it will be if the DSP is created with '0'
as the number of channels in FMOD_DSP_DESCRIPTION.
Specifying an actual channel count will mean you have to take care of any number of channels coming in,
but outputting the number of channels specified. Generally it is best to keep the channel
count at 0 for maximum compatibility.
*/
for (count = 0; count < length; count++)
{
diff = (inbuffer[(count * inchannels) + 0] - inbuffer[(count * inchannels) + 1]) * 0.5f; // filtr hlasu
/*
Feel free to unroll this.
*/
for (count2 = 0; count2 < outchannels; count2++)
{
outbuffer[(count * outchannels) + count2] = diff;
}
}
return FMOD_OK;
}
Download: http://files.cikl.eu/vr.zip