# Recording in-game audio for in-game playback

**URL:** https://qa.fmod.com/t/recording-in-game-audio-for-in-game-playback/18165
**Category:** Unity
**Tags:** unity, csharp
**Created:** [January 4, 2022, 2:24am UTC](https://qa.fmod.com/t/recording-in-game-audio-for-in-game-playback/18165 "2022-01-04T02:24:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yonique](https://avatars.discourse-cdn.com/v4/letter/y/ac8455/32.png) [@yonique](https://qa.fmod.com/u/yonique)
#### Post date: [January 4, 2022, 2:24am UTC](https://qa.fmod.com/t/recording-in-game-audio-for-in-game-playback/18165/1 "2022-01-04T02:24:14Z")

</div>

Hi All - might be a bit of a dumb question, but I was looking at integrating FMOD in place of Unity’s native AudioListener/AudioSource system, however for the purposes of game mechanics I need the ability to record audio as it’s happening in scene and play it back at a later stage. At the moment, I’m writing audio that the AudioListener is picking up to a file stored in the Unity Assets folder, updating that during playback, and then playing this when needed and I’m hoping to replicate this as best I can with FMOD - I’m assuming this is possible, but any pointers as to how best to do this? Or is it really as simple as a one-to-one swap in and out of the Unity Listener and FMOD’s Listener? Thanks!

---

<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: [January 7, 2022, 12:33am UTC](https://qa.fmod.com/t/recording-in-game-audio-for-in-game-playback/18165/2 "2022-01-07T00:33:45Z")

</div>

It is not as simple as a one-to-one swap, but you can record in-game FMOD audio by implementing a DSP\_READCALLBACK. We have a [Unity DSP Capture example](https://fmod.com/resources/documentation-unity?version=2.02&page=examples-dsp-capture.html) which should be a good starting point. You can copy the raw data from the inbuffer and save it to a file, and then play it back later by writing the saved data to the outbuffer.
