# Clear Microphone buffer

**URL:** <https://qa.fmod.com/t/clear-microphone-buffer/16306>\
**Category:** FMOD Engine\
**Tags:** csharp\
**Created:** [October 16, 2020, 4:59am UTC](https://qa.fmod.com/t/clear-microphone-buffer/16306 "2020-10-16T04:59:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoVic](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@LoVic](https://qa.fmod.com/u/LoVic)\
**Post date:** [October 16, 2020, 4:59am UTC](https://qa.fmod.com/t/clear-microphone-buffer/16306/1 "2020-10-16T04:59:34Z")

</div>

Hello  
After recording and playing sound from the microphone, data remains in the buffer.  
If you record a new sound from a microphone, which is shorter than the previous one, then artifacts from the previous recording are heard.  
How do I clear the buffer after playing a sound?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [October 20, 2020, 3:26am UTC](https://qa.fmod.com/t/clear-microphone-buffer/16306/2 "2020-10-20T03:26:24Z")

</div>

You can access the raw data of a Sound and edit it using Sound::lock and Sound::unlock. So you could use that method to clear out previous recordings. Alternatively you could release the old Sound and create a new one for the new recording.

---

<div class="post-metadata">

**Author:** ![LoVic](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@LoVic](https://qa.fmod.com/u/LoVic)\
**Post date:** [October 20, 2020, 12:03pm UTC](https://qa.fmod.com/t/clear-microphone-buffer/16306/3 "2020-10-20T12:03:41Z")

</div>

Thanks.
