godot: `AudioServer.capture_set_device()`and `AudioServer.device()` do not work on Windows
Godot version:
Godot 3.2.3 64 Bit and Godot 3.2.4 RC3
OS/device including version:
Windows 8.1
Issue description:
AudioServer.capture_set_device("Stereo Mix")
don’t work.
print(AudioServer.capture_get_device_list())
Has as output: [Default, Stereo Mix (Realtek High Definition Audio), Microphone (Realtek High Definition Audio)]
But AudioServer.capture_set_device("Stereo Mix")
(or AudioServer.capture_set_device("Stereo Mix (Realtek High Definition Audio)"))
has with print(AudioServer.capture_get_device())
only Default
as output. (It also won’t work with Microphone.)
Maybe the documentation should be improved, if I have understood something wrong. I haven’t tested the AudioServer.device .
Steps to reproduce:
- AudioServer.capture_set_device(“Stereo Mix”)
- print(AudioServer.capture_get_device())
Minimal reproduction project:
AudioServer.zip (Enable Stereo Mix in Windows AudioSettings.)
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 20 (6 by maintainers)
Same problem here, did all of the above but WASAPI is not initializing. I got it to work in a Beta, but somehow the problem returned.
If I run Godot 4 first, no error, but as soon as I turn on another audio program (to get the input in) its starts spitting the errors:
W 0:00:28:0839 thread_func: WASAPI: Current output_device invalidated, closing output_device <C++ Source> drivers/wasapi/audio_driver_wasapi.cpp:794 @ thread_func()
Time flies. Turns out (at least my hunch is) Godot isn’t initializing the microphone (even after enabling audio input in Project Settings). Checking the Windows microphone settings, the last time Godot asked for microphone use was in Godot 3 about a year ago on my machine. So for some reason, WASAPI might not be initializing now in Godot 4.0.
Microphone input does not work on Godot 4 Beta 17 & RC1 due to #72892. I’ll build from master on Windows 11 and see if that makes a difference.
Do you have microphone access enabled in the Windows settings? This setting affects both Win32 and UWP applications.
Also make sure Let desktop apps access your microphone is enabled on that page.