0
0

I create a custom DSP using System::createDSP(). I define FMOD_DSP_READCALLBACK and FMOD_DSP_SETPOSITIONCALLBACK. Read callback is called properly, so I think DSP is installed properly. But position callback isn’t called at all. (Channel::setPosition() is called). So inner position counters go wrong and DSP works in a wrong way.

Installation of the DSP is done in the next way:

FMOD::DSP *head, *root, *dsp;
root = head = NULL;
fmodChannel_->getDSPHead(&head);
int numInputs;
head->getNumInputs(&numInputs);
head->getInput(0, &root);
head->disconnectFrom(root);

FMOD_DSP_DESCRIPTION descr;
descr.read = DSPReadCallback;
descr.setposition = DSPSetPosCallback;
descr.userdata = this;

system->createDSP(&descr, &dsp);

dsp->addInput(root);
head->addInput(dsp);
dsp->setActive(true);
dsp->setBypass(false);

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.