Access to audio file's full PCM buffer in DSP plugin

I’m looking into the feasibility of developing a plugin that will allow DJ-style scratching / scrubbing playback of a single audio file. The normal way I know of to do this is via sample interpolation and manual playhead control. Is there’s a way for FMOD to give me the entire PCM audio data buffer for an audio file? Or for a DSP plugin to take an audio file as an input that I could then read from myself?

Looks like I could do this if I could get a pointer to System inside a plugin. Is this possible?

Hi,

FMOD Engine | Advanced Core Api Topics - Extracting Pcm Data From A Sound

It is possible to write your own DSP, we have some docs for that here: FMOD Engine | Dsp Plugin Api Guide - The Plug In Descriptor

Using FMOD Engine | Core Api Dsp - Dsp::Setuserdata you could pass your system pointer to be accessed within the DSP.

Hope this helps!

Ooh the UserData idea is clever. What I ended up doing is using a data param to drop in an ogg file and then decode it myself with the stb_vorbis library. That works, but there’s a stutter when it does the initial read. Getting the sample data from the System would be much preferred. Thanks!

1 Like