Skip to content
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

Disconnecting wireless earphones causes WASAPI error messages to show up in the editor #104837

Open
chocola-mint opened this issue Mar 31, 2025 · 0 comments · May be fixed by #104839
Open

Disconnecting wireless earphones causes WASAPI error messages to show up in the editor #104837

chocola-mint opened this issue Mar 31, 2025 · 0 comments · May be fixed by #104839

Comments

@chocola-mint
Copy link
Contributor

chocola-mint commented Mar 31, 2025

Tested versions

  • Reproducible in 4.3
  • Reproducible in 4.5.dev (latest master)

System information

Godot v4.5.dev (e585e6a) - Windows 11 (build 26100) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 3050 Laptop GPU (NVIDIA; 31.0.15.5339) - 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz (12 threads)

Issue description

The following messages are shown whenever I disconnect my wireless earphones while using the Godot editor:

ERROR: drivers\wasapi\audio_driver_wasapi.cpp:780 - WASAPI: GetBufferSize error
WARNING: drivers\wasapi\audio_driver_wasapi.cpp:851 - WASAPI: Current output_device invalidated, closing output_device

The warning is expected, but the error is not.

The function call ad->audio_output.audio_client->GetBufferSize(&buffer_size) can actually return AUDCLNT_E_DEVICE_INVALIDATED, but this is not handled properly, causing an unneeded error message to appear. The subsequent ad->audio_output.render_client->GetBuffer(write_frames, &buffer) call does handle this case properly, however.

Steps to reproduce

  1. Open any Godot project.
  2. Connect your PC with wireless earphones. Make sure that they are the current output device.
  3. Disconnect them.
  4. See the error messages generated in the editor output.

Minimal reproduction project (MRP)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: For team assessment
Status: For team assessment
Development

Successfully merging a pull request may close this issue.

2 participants