Skip to content

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

@dreaw131313

Description

@dreaw131313

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions