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

Noisy sounds with glfw and not working windows file dialogs cause of CoInitialize with COINIT_MULTITHREADED parameter #378

Open
dreaw131313 opened this issue Nov 10, 2024 · 0 comments

Comments

@dreaw131313
Copy link

Soloud version: most recent commit from master
Operating system: Windows 10
Backend: WASAPI

I am implementing audio to in game engine, and I faced two problems/issues:

  1. I am using GLFW for creating windows and when I call "glfwInit" before "SoLoud::Soloud::init()" playing audio have noise
  2. When I try open file dialogs with windows api it will not work. I figured out that is because SoLoud wasapi backed calls "CoInitialize(): with COINIT_MULTITHREADED, and I think it is also related to my first problem.

So workarounds are simple, first I need create Soloud instance and then call glfw init. For second problem I found workaround, just to create new thread and open dialogs from it. But maybe there are simpler solutions to resolve this problems with changes to wasapi backend implementation. I need to add when I changed "CoInitialize()" function to use COINIT_APARTMENTTHREADED audio was noisy.

These may not be serious problems, but this issue may help resolve them for other users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant