# Get Output Buffer from API

**URL:** <https://qa.fmod.com/t/get-output-buffer-from-api/19385>\
**Category:** FMOD Engine\
**Created:** [October 11, 2022, 10:34am UTC](https://qa.fmod.com/t/get-output-buffer-from-api/19385 "2022-10-11T10:34:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shplss](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@shplss](https://qa.fmod.com/u/shplss)\
**Post date:** [October 11, 2022, 10:34am UTC](https://qa.fmod.com/t/get-output-buffer-from-api/19385/1 "2022-10-11T10:34:53Z")

</div>

Hello,

Currently I’m developing an app in JUCE that uses the FMOD API for behaviour handling of events and other things, and I’d like to tap into the output buffer in order to pass it into the JUCE buffer, instead of having FMOD handling the audio output.

I’ve tried to tap into the channel in order to do the above but ended up with crackle and it just overall didn’t feel like the most efficient way to solve this issue.

So my question is, what is the best way to access the Master Bus buffer from FMOD?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [October 17, 2022, 4:21am UTC](https://qa.fmod.com/t/get-output-buffer-from-api/19385/2 "2022-10-17T04:21:31Z")

</div>

There are a few ways to get access to the audio buffer. Since you are using Events / Studio API the best way to access the raw audio data would be to attach a custom DSP to the Master Channel and read from the inbuffer in the DSP’s [read callback](https://fmod.com/docs/2.02/api/plugin-api-dsp.html#fmod_dsp_read_callback). I would recommend looking at the _dsp\_custom_ [Core API example](https://fmod.com/download#fmodengine) for a reference on how to create a DSP and read incoming audio data at runtime.  
If you are still getting crackling after doing that you may need to modfy your design to add an intermediate buffer between FMOD and JUCE, and if you already have one then you may need to increase the distance between your read and write pointers to ensure there is always enough audio data for JUCE to read.
