# Callback to capture DSP rendered output audio buffer

**URL:** <https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458>\
**Category:** FMOD Engine\
**Tags:** android, cpp\
**Created:** [July 24, 2023, 6:10pm UTC](https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458 "2023-07-24T18:10:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiguelDias90](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@MiguelDias90](https://qa.fmod.com/u/MiguelDias90)\
**Post date:** [July 24, 2023, 6:10pm UTC](https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458/1 "2023-07-24T18:10:50Z")

</div>

Hey, guys,

I have a code in C++ that regularly updates audio effects implemented in FMOD Studio.

I need a callback that gives me access to the FMOD’s DSP, where I get the output audio buffer (PCM) after being processed/rendered (I don’t intend to add any custom effects from here). Is this possible or is there some better/easier method?

I’ve tried several implementations for a few weeks now (also, “dsp\_custom”), but to no avail. That’s why I’m here because I need help.  
Some code snippet that would help me achieve that goal would be great! 🙏

Thanks in advance for any help you can give me. 😃

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [July 26, 2023, 1:29am UTC](https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458/2 "2023-07-26T01:29:53Z")

</div>

Hi,

We have a Unity example that outlines using an `FMOD.DSP_READ_CALLBACK`: [Unity Integration | Scripting Examples - DSP Capture](https://fmod.com/docs/2.02/unity/examples-dsp-capture.html). This can be made into a C++ program without too many major changes.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![MiguelDias90](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@MiguelDias90](https://qa.fmod.com/u/MiguelDias90)\
**Post date:** [July 28, 2023, 10:12am UTC](https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458/3 "2023-07-28T10:12:15Z")

</div>

Hey Connor,

Thanks for pointing me to a solution.

In fact, my project is done with FMOD Studio, and it seems to me that the solutions I’ve seen only serve to access the DSP (core) when using the FMOD Engine directly.

Am I correct in assuming that some extra steps are needed to access the DSP?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [July 30, 2023, 11:48pm UTC](https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458/4 "2023-07-30T23:48:34Z")

</div>

Hi,

> [@MiguelDias90](#):
>
> Am I correct in assuming that some extra steps are needed to access the DSP?

Yes, to access the DSP you will have to go through the core engine ([FMOD Engine | Studio API Reference - System](https://fmod.com/docs/2.02/api/studio-api-system.html#studio_system_getcoresystem)) to have access the DSP functions ([FMOD Engine | Core API Reference - DSP](https://fmod.com/docs/2.02/api/core-api-dsp.html)) if this is what you are referencing. If I am mistaken, could you please elaborate on how you are trying to access DSP’s?

---

<div class="post-metadata">

**Author:** ![MiguelDias90](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@MiguelDias90](https://qa.fmod.com/u/MiguelDias90)\
**Post date:** [August 4, 2023, 3:36pm UTC](https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458/5 "2023-08-04T15:36:56Z")

</div>

> [@Connor\_FMOD](#):
>
> ess the DSP functions ([FMOD Engine | Core API Reference - DSP](https://fmod.com/docs/2.02/api/core-api-dsp.html)) if this is what you are referencing. If I am

Thanks again for your help, after all I was able to get access to the DSP as expected! 😁

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [August 6, 2023, 11:09pm UTC](https://qa.fmod.com/t/callback-to-capture-dsp-rendered-output-audio-buffer/20458/6 "2023-08-06T23:09:34Z")

</div>

Happy to help, if you have any more questions please do not hesitate to ask!
