Reproduction steps:
1. Add a command line argument “-showAudioFoundationUI”
2. Open the attached project “ReproProject”
3. Make sure that Audio Foundation option is set to “Enhanced“ (the option can be found at Edit → Project Settings → Audio → Audio Foundation)
4. Open the scene “SampleScene”
5. Connect headphones with microphone (can be wired or wireless)
6. Enter into the Play Mode
7. Wait up to 15-20 seconds
8. Observe the crash
Reproducible in: 6000.5.0a7 (ffd9df7c38b8)
Not reproducible in: 2023.1.0a1, 6000.0.67f1, 6000.3.8f1, 6000.4.0b8, 6000.5.0a6
Reproducible on: Windows 11
Not reproducible on: No other environments tested
Notes:
- Also reproducible in Standalone Player for Windows
- To add a command line argument in Unity Hub, navigate to Projects → [ReproProject] → Press the three-dots on the right → Add command line arguments
First few lines of the stack trace:
0x00007FF9C99B8876 (Unity) PlatformAudio::WasapiPlugin::StartDeviceInternal
0x00007FF9C99B7938 (Unity) PlatformAudio::WasapiPlugin::CreateAndStartDevice
0x00007FF9C99D8477 (Unity) PlatformAudio::PlatformAudioManager::StartDevice
0x00007FF9C99D7576 (Unity) PlatformAudio::Device::MixThread