FMOD_DSP_LOG

I see that a new logging function has been added to the DSP plugin API. However, I can’t find any mention of it in either the manual or the examples. Could I trouble one of you guys for a simple example of its use? Thanks.

From fmod_dsp.h you have:

typedef void (F_CALL *FMOD_DSP_LOG_FUNC)(FMOD_DEBUG_FLAGS level, const char *file, int line, const char *function, const char *string, ...);

and you can access it easily with the helper macro at the bottom of fmod_dsp.h

#define FMOD_DSP_LOG(_state, _level, _location, _format, ...)

  • _state is the FMOD_DSP_STATE given to all DSP callbacks
  • _level is the FMOD_DEBUG_FLAGS log level, i.e. FMOD_DEBUG_LEVEL_ERROR, FMOD_DEBUG_LEVEL_WARNING or FMOD_DEBUG_LEVEL_LOG
  • _location is just a string used to identify where you are in your code, often I used the function name for this.
  • _format is a printf format string, and the following var_args are the printf parameters

Hope that helps.

1 Like

Thanks, just what I was looking for. I’m surprised VS didn’t find that method when I searched through the API source. Thanks again.