# Processing recorded sound in real time?

**URL:** <https://qa.fmod.com/t/processing-recorded-sound-in-real-time/19347>\
**Category:** FMOD Engine\
**Tags:** mac, cpp\
**Created:** [September 30, 2022, 11:05am UTC](https://qa.fmod.com/t/processing-recorded-sound-in-real-time/19347 "2022-09-30T11:05:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arielm](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@arielm](https://qa.fmod.com/u/arielm)\
**Post date:** [September 30, 2022, 11:05am UTC](https://qa.fmod.com/t/processing-recorded-sound-in-real-time/19347/1 "2022-09-30T11:05:54Z")

</div>

Hi,

I’m quoting from this [9 years old article](https://katyscode.wordpress.com/2013/11/24/cutting-your-teeth-on-fmod-part-6-recording-and-visualizing-sound-card-output/) and I would like to know if it has changed since then.

_The problem with any kind of analysis or processing of sound in FMOD is that it can only be done on an FMOD::Sound object that is currently playing through your own application on an FMOD::Channel . You can’t take an external sound source and process it. This is obviously a problem. The workaround is the following slightly creative procedure:_

_1. Create an FMOD::Sound which is empty and has short duration_  
_2. Configure FMOD to record the sound card output to this sound, wrapping around and overwriting the oldest content every time it fills (using the sound buffer as a circular buffer)_  
_3. Play the sound in a loop with a slight lag with the volume set to zero_  
_4. Use any processing or analysis functions we would normally use on the sound as it plays_

_This works because playing the sound in a loop will ensure that the output is the same as the sound card’s output. The latency is required to ensure the sound buffer doesn’t empty at the start, or playback overruns and we end up re-playing bits of old already played sound in the buffer. Playing the sound back silently works because analysis functions are performed on the original waveform before FMOD applies volume adjustments._

---

<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 5, 2022, 11:38pm UTC](https://qa.fmod.com/t/processing-recorded-sound-in-real-time/19347/2 "2022-10-05T23:38:06Z")

</div>

Yes that is still the recommended way to record audio in FMOD. Please see the **record** and **record\_enumaration** Core API examples available from the FMOD Engine downloads for up-to-date examples on how to do this.
