godotengine / godot

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

4-Channel Audio Input is not supported #98500

Open gjmwolmarans opened 1 month ago

gjmwolmarans commented 1 month ago

Tested versions

System information

Windows 11 Pro; godot 4.3-stable 4-Channel Microphone Array

Issue description

trying to run the audio\mic_record sample on an ASUS laptop with a 4-channel microphone array produces no audio when recording, and throws the below error multiple times:

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

Steps to reproduce

Run the audio\mic_record sample on a machine with a 4-channel microphone array input device.

The Driver only caters for 1 or 2 channels for input.

Minimal reproduction project (MRP)

https://github.com/godotengine/godot/blob/77dcf97d82cbfe4e4615475fa52ca03da645dbd8/drivers/wasapi/audio_driver_wasapi.cpp#L855

fire commented 1 month ago

I believe there's a feature proposal for this.

gjmwolmarans commented 1 month ago

I've tried with a 2-channel input also, and it didn't work either.

Calinou commented 1 month ago

I've tried with a 2-channel input also, and it didn't work either.

Does it print any error in this case? Try adjusting the sample rate as well to 44100 Hz or 48000 Hz.

gjmwolmarans commented 1 month ago

It doesn't print an error in the 2-channel case, I have tried switching to 48000 Hz.

I have come across this forum post of other users also experiencing the same issue.