# Audio Record fails to initialize

**URL:** <https://forum.magicleap.cloud/t/audio-record-fails-to-initialize/1642>\
**Category:** Hardware Troubleshooting\
**Tags:** unity\
**Created:** [March 28, 2023, 8:37pm UTC](https://forum.magicleap.cloud/t/audio-record-fails-to-initialize/1642 "2023-03-28T20:37:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![om-iman](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@om-iman](https://forum.magicleap.cloud/u/om-iman)\
**Post date:** [March 28, 2023, 8:37pm UTC](https://forum.magicleap.cloud/t/audio-record-fails-to-initialize/1642/1 "2023-03-28T20:37:35Z")

</div>

We've ported an application from ML1 to ML2 that uses the popular Dissonance third party library for voice communications. It works great on the ML1, but on the ML2 we are getting some low level Android errors during app startup:

I have contacted the very responsive developer of the library and he is unable to diagnose any further since this is a low level error coming from the APIs Dissonance is calling into. He has made himself available to cooperate in finding a resolution.

Note that the app definitely has the RECORD\_AUDIO permission in its AndroidManifest.xml (confirmed by disassembling the APK), and also the app successfully asks for audio recording permissions on first launch.

**ML2 OS version** :  
Version 1.2.0-dev1  
Build B3E.230202.11-R.036  
Android API Level 29

**Error messages from logs** (syntax-highlighting is supported via Markdown):

```auto
2023-03-28 11:31:20.622 25027-25163/? E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -1.
2023-03-28 11:31:20.623 25027-25163/? E/AudioRecord: Failed to destroy audio input: -1643053055
2023-03-28 11:31:20.623 25027-25163/? E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
2023-03-28 11:31:20.623 25027-25163/? E/FMOD: AudioRecord failed to initialize (status 0)

```

---

<div class="post-metadata">

**Author:** ![kdowney](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kdowney/32/481_2.png) [@kdowney](https://forum.magicleap.cloud/u/kdowney)\
**Post date:** [March 31, 2023, 1:55pm UTC](https://forum.magicleap.cloud/t/audio-record-fails-to-initialize/1642/2 "2023-03-31T13:55:54Z")

</div>

Hi @om-iman Thank you for your post. Magic Leap 2 is built on top of the [Android Open Source Project](https://source.android.com/) (AOSP), Android 10 (Q) API level 29. The key to Magic Leap 2 compatibility is x86\_64 architecture support. Since Dissonance is a 3rd party app, troubleshooting compatibility issues falls outside the scope of our support.

---

<div class="post-metadata">

**Author:** ![om-iman](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@om-iman](https://forum.magicleap.cloud/u/om-iman)\
**Post date:** [March 31, 2023, 6:23pm UTC](https://forum.magicleap.cloud/t/audio-record-fails-to-initialize/1642/3 "2023-03-31T18:23:28Z")

</div>

The Dissonance VOIP library does include x86\_64 libraries compiled for Android. I've verified they are being loaded as well. Note that this is a very popular third party library (hundreds of 5-star reviews on the Unity asset store) and it will add a lot of value to the Magic Leap platform to ensure compatibility with it.

---

<div class="post-metadata">

**Author:** ![kdowney](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kdowney/32/481_2.png) [@kdowney](https://forum.magicleap.cloud/u/kdowney)\
**Post date:** [April 4, 2023, 1:34pm UTC](https://forum.magicleap.cloud/t/audio-record-fails-to-initialize/1642/4 "2023-04-04T13:34:04Z")

</div>

Hi @om-iman, Are you able to upload your Diagnostic Logs from Device Bridge? Magic Leap Hub \> Device Bridge \> Save Diagnostic Logs and Save Bug Report. We'll take a look at what the issue may be. If you can also put us in touch with the developer on an email chain including [developer@magicleap.com](mailto:developer@magicleap.com), we can look into out of the box support. Thanks very much.
