In FMod 3, you used to have stream dsp’s, which were executed before resampling (just after decoding I assume) and dsp’s on the output.
In FMod 4, dsp’s can be added to both channels and the total output.
The advantage of channel dsp’s is obviously that they are executed much closer to the output, leading to a lower latency.
I was wondering though, if it is still possible to add dsp’s before resampling. (Maybe by running down the dsp chain using the getInput functions on the head of the channel dsp?)
The reason is that this is more useful for bpm/tempo detection since you are certain that the output frequency isn’t changed while the sound is running.
I could imagine that this would be useful for other sound pre-processing as well, such as some sort of equalizer for example.
- Adion asked 13 years ago
first of all, I think you are talking about a usage of pcmread I don’t know. I assume you can configure the read function as DSP-like function that processes the input and put’s it pack to the stream. How do you do this? The only version of pcmread I know is to generate a sound like usercreated sound samples. I have one more question is there something like Sound::dataPos() planned? That means a PCM-Bytes position inside the data that’s read by Sound::readData or seeked by Sound:seekData().
thanx for the reply. It was very helpfull. I think now I understand a bit more of your concepts;)
That means System::createSound(file_name,FMOD_CREATESTREAM|FMOD_OPENUSER, &exinfowithpcmreadcallback, &newsound) will create a stream from a file and run the processing in pcmread before resampling. And the parameter *data in pcmreadcallback is input and output to the same time. Is that right?
Sure, it is possible to count the position by myself. I was just wondering if there will be such a thing in the future.
I have a small question regarding the sound format that’s used in FMOD.
In my readData I get a newiesh buffer with my 16Bit stereo sound. I read in the documentation the it is sorted as LeftLow LeftHigh RightLow RightHigh and so on and your data is always signed. Is that right? I am able to pass this buffer through and to the pcmread of a new sound object, but if I used one of my old dsp filters it doesn’t work. I probably have a different byte alignment or a signed unsigned mistake.
Please login first to submit.