# Pausing and Resuming Recording

**URL:** <https://qa.fmod.com/t/pausing-and-resuming-recording/18606>\
**Category:** FMOD Engine\
**Tags:** unity, csharp\
**Created:** [April 1, 2022, 2:08pm UTC](https://qa.fmod.com/t/pausing-and-resuming-recording/18606 "2022-04-01T14:08:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aondw](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aondw](https://qa.fmod.com/u/aondw)\
**Post date:** [April 1, 2022, 2:08pm UTC](https://qa.fmod.com/t/pausing-and-resuming-recording/18606/1 "2022-04-01T14:08:00Z")

</div>

Hi,  
I’m using `CoreSystem.recordStart` and `recordStop` to record the users’ microphone into a sound object.  
Now when the game is paused I wanna pause the recording and on unpause resume the recording.

Can I somehow continue recording into the same sound object? I haven’t been able to find a suitable method for this.

---

<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:** [April 5, 2022, 6:31am UTC](https://qa.fmod.com/t/pausing-and-resuming-recording/18606/2 "2022-04-05T06:31:10Z")

</div>

Presuming you have released your existing `Sound` you will need to go through the process of calling `System::createSound` and `System::recordStart` on the sound again.

---

<div class="post-metadata">

**Author:** ![aondw](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aondw](https://qa.fmod.com/u/aondw)\
**Post date:** [April 5, 2022, 8:46am UTC](https://qa.fmod.com/t/pausing-and-resuming-recording/18606/3 "2022-04-05T08:46:37Z")

</div>

So if I wanna replay the whole recording later (without the pause), I probably gotta keep multiple Sounds around and then replay them one after the other?

---

<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:** [April 7, 2022, 12:17am UTC](https://qa.fmod.com/t/pausing-and-resuming-recording/18606/4 "2022-04-07T00:17:29Z")

</div>

I think that is a good solution. You could potentially pause the mixer with [`System::mixerSuspend`](https://fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#system_mixersuspend) and resume it again with [`System::mixerResume`](https://fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#system_mixerresume) to have an unbroken recording, but that would stop all audio in the system while it’s paused.

---

<div class="post-metadata">

**Author:** ![aondw](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@aondw](https://qa.fmod.com/u/aondw)\
**Post date:** [June 16, 2022, 12:11pm UTC](https://qa.fmod.com/t/pausing-and-resuming-recording/18606/5 "2022-06-16T12:11:55Z")

</div>

So I finally got around to implementing it, what I ended up doing for anyone that might come across that thread later:

- Preallocate a bunch of sound objects
- Record into a sound object
- If the game is paused, stop recording, save how much was recorded of the sound with `CoreSystem.getRecordPosition` and use a new sound object to record into once the game is unpaused.
- When replaying I check the current position of the channel with `channel.getPosition` and compare that to the saved length. If I’m over the length I stop playing this one and select the next sound object to play.
