0
0

I need to generate the waveform of a sound that is being played through a channel which has received a DSP effect (specifically, lowpass or highpass filters). I have already successfully drawn a waveform using Sound::lock(), but this is not sensitive to DSP effects, as they are added at the channel level, not to the sound. I am looking for a solution that will allow me to display the affected waveform by either adding an effect directly to the sound, mimicking the effects of a filter in the PCM data, or receiving the PCM data of the affected channel.
Thank you in advance.

  • You must to post comments
0
0

If you are just looking to get a snapshot of the currently playing data at a certain point in the DSP tree you could use a channel group and its getWaveData function.

Otherwise if you are looking to get all the audio data (not just a snapshot in time) you would have to create a custom DSP that copies the data off and passes it through to the next node (if that makes sense).

You can check the docs / examples for how to use these features, but if you have any troubles let me know.

  • You must to post comments
0
0

[quote="mathew":raj7x2az]If you are just looking to get a snapshot of the currently playing data at a certain point in the DSP tree you could use a channel group and its getWaveData function.

Otherwise if you are looking to get all the audio data (not just a snapshot in time) you would have to create a custom DSP that copies the data off and passes it through to the next node (if that makes sense).

You can check the docs / examples for how to use these features, but if you have any troubles let me know.[/quote:raj7x2az]

Buffers in FMOD_DSP_READCALLBACK are float values how I can convert them into ints so I can save them into wav file?

  • You must to post comments
0
0

Floating point audio is generally from -1.0f to 1.0f however inside the DSP network it may go over. So basically multiply up to the maximum value then clamp…

[b:34ens27a]For PCM16 output:[/b:34ens27a]
[code:34ens27a]inFloat *= 32768;
outInt = inFloat < -32768 ? -32768 : inFloat > 32767 ? 32767 : (signed short)inFloat;[/code:34ens27a]

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.