Starting microphone failed: "Error initializing output device. " (60)

Hi Y’all,

does anybody have experience with running a x86_x64 build, accessing the microphone and having Kaspersky installed?

For some reason Kaspersky will block the microphon BUT ONLY if I have set an own Default Icon!

How to reproduce:

  • Create a new Unity project (2018.4.24 in my case)
  • Add UI->Text to scene
  • Create new C# script (MicTest) and add the code as seen below
  • Attach the script to the previously created text game object
  • Build and Run! (platform = windows)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class MicTest : MonoBehaviour
{
    Text uiText;
    // Start is called before the first frame update
    void Start()
    {
        uiText = GetComponent<Text>();

        Microphone.Start(null, true, 120, 16000);

    }

    // Update is called once per frame
    void Update()
    {
        uiText.text = "MicPosi: " + Microphone.GetPosition(null);

    }
}

Everything OK - the text inside the scene starts counting up

Now…

  • Add some icon to the project folder
  • Open Player Settings and change the Default Icon
  • Build and Run again!

The text doesn’t change and the log file will show
Starting microphone failed: "Error initializing output device. " (60)
Kaspersky log also shows that it blocked the microphone.

If you build without a Default Icon and then change the icon (using some third-party resource tools) will have the same result.

And if you repeat all steps using Unity 2020.2, it doesn’t matter if setting a Default Icon or not, none will work!

Best regards,
CAD Schroer GmbH

Does anybody have an idea?

Did you solve the issue? I’m struggling with the same.

I thought that might be because of permissions, but
Application.RequestUserAuthorization(UserAuthorization.Microphone)
didn’t help. Works on Mac, doesn’t work on PC.

PS: Unity 2022.1.3f1

Ich denke, es ist ein Hardware Problem, da auf einem anderen PC keine Probleme gibt! An Kaspersky liegt es auch nicht! Es verwundert mich das Unity keine Probleme meldet !

We’ve added our application to Kaspersky’s ignore list.

Wir haben es mit verschiedenster Hardware getestet und konnten das Problem auf jedem Rechner reproduzieren. Es lag definitiv an Kaspersky, vielleicht eine bestimmte Einstellung?!
Wie schon gesagt, unser Executable auf die Ausnahmeliste gepackt und alles war gut.