I am currently wondering how I can do this :
I would like to alter the global output (all channels mixed down by the FMOD mixer) using a callback.
I know I can alter each channel separately using a PCM READ CALLBACK but it’s too CPU expensive if there are many channels to alter.
I’ve looked into the docs but got a little lost about it.
Is it possible to do such a thing ?
Thanks for your attention.
- artscoop asked 12 years ago
Just to point you at the functions that Heffo’s referencing in more detail, have a look at the documentation for:
System::getMasterChannelGroup() – this is where you will hook to the output
ChannelGroup::addDSP() – you’ll be taking the master channel group and adding your custom DSP to it
struct FMOD_DSP_DESCRIPTION – this is the structure you’ll be filling out to generate your DSP. There are a few function callbacks you may be using.
System::createDSP() – you’ll pass the FMOD_DSP_DESCRIPTION into this to create your DSP object.
You can have a look at dsp_custom to see a simple example of a custom DSP.
- Adiss answered 12 years ago
[quote="Adiss":3q5m0osh]Just to point you at the functions that Heffo’s referencing in more detail, have a look at the documentation for:[/quote:3q5m0osh]
Thanks for pointing that out for me.. I would have but I didn’t have the docs handy, and work got in the road a bit
Hmm I’m not sure I understand what you’re talking about.
You mean I can make a custom DSP with code that processes the sound as I want ?
I suppose this DSP takes in input the current sound buffer, the length of the buffer, and custom user data ?
Please login first to submit.