-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When there's no audio output device, AudioStreamPlayer finished
signal isn't emitted
#88775
Comments
As you can see it shows a clear error that it can't initialize audio, so I think it's expected that audio just doesn't work, I'm not sure how this should be solved or if any audio code should be running in this case I suspect playback in various ways depends on the actual audio device behavior, and therefore can't reliably emit the signal if none is available A dummy device could be used instead though, unsure how that works or would work though, for example a fallback Edit: This sounds like a duplicate of this issue, which was solved recently for 4.3, and cherry picked for 4.2.2: Please try 4.3.dev3 or 4.2.2.rc1, this should have been solved |
Thanks for finding that previous issue. I just tried 4.3.dev3, but it doesn't work. I do see " WARNING:All audio drivers failed, falling back to the dummy driver.", so something has changed, but I still don't get the |
Let's keep this open and see what else is needed there |
|
just confirmed this, through trial and error that every line below the audio_finished is never run if no sound device is attached or found. Is there any type of error handling that could be used to catch this? |
finished
signal isn't emitted
Tested on 4.3-dev5, it seems to work as expected for me when using I modified the MRP to autoplay and print the state in the terminal to test: I haven't tried in a Windows VirtualBox VM though, but if the fallback to the Dummy audio driver works correctly, it should work. Could you test both with the automatic fallback when WASAPI fail (just running Godot normally), and with |
I installed a Windows 11 VM in VirtualBox to test, but I missed that there were custom ones on https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ and I did a plain Windows 11 Pro install from the main install ISO. The VM has working audio, so I can't reproduce the bug either 🙃 Edit: I disabled audio support in VBox, so I could reproduce WASAPI failing to initalize. Even then, the MRP works fine for me, it properly emits Please comment if you still reproduce it and provide more details on how you're testing. |
Fixed by #71640. |
Confirmed that with or without Thanks for the quick fix! |
Tested versions
v4.2.1.stable.official.b09f793f5
System information
Windows 11 VM from Microsoft, in VirtualBox
Issue description
I'm running Godot using VirtualBox from a Windows 11 VM guest, Linux host. I haven't got audio set up yet, so there are no audio devices on the guest. I am playing a sound using:
On my Linux host, it works fine. On the Windows guest (with no audio device),
finished
is never emitted and the game just hangs in theawait
. Please insert Samuel Beckett joke here.If I could detect the no-audio condition, I could avoid waiting on the signal, but I don't see a way to do that.
Steps to reproduce
I've attached a repro project; it's slightly different in that it doesn't use gdscript to await the signal, but the effect is the same: the
finished
signal is never fired.The startup messages:
Minimal reproduction project (MRP)
no-audio.zip
I'm using the VirtualBox VM from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ on a Linux host.
The text was updated successfully, but these errors were encountered: