godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.69k stars 20.11k forks source link

Godot does not listen to microphones with over 2 channels #82823

Open marc-weber1 opened 11 months ago

marc-weber1 commented 11 months ago

Godot version

4.2 dev 5 [9ff46d0]

System information

Godot v4.2.dev5 - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) UHD Graphics 620 () - Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz (8 Threads)

Issue description

When trying to listen to a microphone with 4 channels, godot returns this error:

E 0:00:06:0920   thread_func: WASAPI: unsupported channel count in microphone!
  <C++ Source>   drivers/wasapi/audio_driver_wasapi.cpp:877 @ thread_func()

Ideally it would just take the first 2 channels, or combine all channels into 1?

Steps to reproduce

With a PC with a microphone with over 2 channels, create an AudioStreamPlayer, with an AudioStreamMicrophone in it, and route it to master.

Just notify me if you need to test code? I can recompile the engine.

Minimal reproduction project

mic test.zip

kus04e4ek commented 4 months ago

Should be fixed by #90013. Can you test it?

nekocarpet commented 4 months ago

Got this error in V4.2.2 stable and v4.3 dev6. I'm using a built-in microphone on my laptop which has 4 channels.

https://github.com/godotengine/godot/issues/30313 is made a while ago also with a 4 channel mic.

Moosil commented 2 months ago

Should be fixed by #90013. Can you test it?

Not sure if you've already tested it, but it does fix the issue. Also if it's useful, I am using a built-in 4 channel microphone on a laptop as well.