# Native Android screen recorder causes Microphone to stop working

**URL:** https://qa.fmod.com/t/native-android-screen-recorder-causes-microphone-to-stop-working/17623
**Category:** Unity
**Tags:** android
**Created:** [August 31, 2021, 12:17am UTC](https://qa.fmod.com/t/native-android-screen-recorder-causes-microphone-to-stop-working/17623 "2021-08-31T00:17:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BadDreamGames](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/baddreamgames/32/1581_2.png) [@BadDreamGames](https://qa.fmod.com/u/BadDreamGames)
#### Post date: [August 31, 2021, 12:17am UTC](https://qa.fmod.com/t/native-android-screen-recorder-causes-microphone-to-stop-working/17623/1 "2021-08-31T00:17:03Z")

</div>

Hello! The game I’m working on makes heavy use of microphone input data, and I’ve realized that starting the native android screen recorder causes the microphone to stop accepting input.

Important facts:

- Audio data is being captured with sound.lock() and sound.unlock()
- This only happens when screen recorder is capturing microphone data
- Getting input driver info before, during, and after does not reveal any change to the driver state
- Trying to start recording while screen capture is active does not result in any error. Here’s where it gets extra weird: if I restart recording while capturing **microphone only** I can retrieve audio data again. If I’m recording microphone **and device audio** I won’t be able to retrieve any audio data, regardless of how much I try to restart the recording.
- Unity version 2020.1.17, FMOD version 2.01.07
- Android version 11

Thank you for any advice!

---

<div class="post-metadata">

### Author: ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)
#### Post date: [September 7, 2021, 4:39am UTC](https://qa.fmod.com/t/native-android-screen-recorder-causes-microphone-to-stop-working/17623/2 "2021-09-07T04:39:38Z")

</div>

Hi BadDreamGames,

We’ve reproduced this issue - it looks to be an issue with our AAudio output support. We have been able to reproduce the issue and will look to fix this in a future version.

If you would like to work around it, if you call [https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#system\_setoutput](https://www.fmod.com/resources/documentation-api?version=2.02&page=core-api-system.html#system_setoutput) and set the type to FMOD\_OUTPUTTYPE\_OPENSL, that will work around the issue until we are able to get it fixed.

---

<div class="post-metadata">

### Author: ![BadDreamGames](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/baddreamgames/32/1581_2.png) [@BadDreamGames](https://qa.fmod.com/u/BadDreamGames)
#### Post date: [September 8, 2021, 8:11pm UTC](https://qa.fmod.com/t/native-android-screen-recorder-causes-microphone-to-stop-working/17623/3 "2021-09-08T20:11:13Z")

</div>

Thanks for the response Tristan. We’ve been using Open SL, and I made sure that nothing else was changing the output type by explicitly checking at each step. Using that output type does not change the issue.

---

<div class="post-metadata">

### Author: ![tristanjl](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/tristanjl/32/261_2.png) [@tristanjl](https://qa.fmod.com/u/tristanjl)
#### Post date: [September 10, 2021, 6:08am UTC](https://qa.fmod.com/t/native-android-screen-recorder-causes-microphone-to-stop-working/17623/4 "2021-09-10T06:08:35Z")

</div>

Ok, I’ve tested on another handset and I’ve been able to reproduce the issue with OpenSL. On this particular handset, it looks like the screen recorder is taking over microphone input while its running. If that’s the case, and its handset specific behaviour, there may not be much we can do, at least with OpenSL. We will look to resolve the issue with AAudio and see if that presents a different way to get this working.
