Replies: 1 comment 2 replies
-
This is a very strange one. I'm struggling to make sense of those call stacks. The The other thing I'm confused at is how these are even running in two separate threads. It doesn't look like you're doing any kind of threaded init/uninit/start/stop on your end, right? The The only thing I can think of off the top of my head is that maybe a device reroute is getting triggered by WASAPI when the device is started for some reason? But if that was the case I would have expected to see a Do you have a logging system? miniaudio has the ability to plug in a logging callback. I wonder if maybe that could be useful. You can plug a On a bit of a side note, with your code, it's slightly unusual to be using |
Beta Was this translation helpful? Give feedback.
-
Hi, firstly thanks for providing this library 🙏
I'm the maintainer of Chatterino2 which is a Twitch chat client - we use miniaudio to play sound notifications.
We've had reports of a few users on Windows (latest one being on Windows 10 Version 2009, kernel: 10.0.19045) of miniaudio freezing when the first sound plays, forcing them to restart the application after which it works as expected.
I suspect this is something we do wrong in our application
The thread calling
ma_device_start
looks like this at the point of the freeze:Another thread at the same time looks like this:
The rest of the threads: https://rentry.co/d9mmz
Our initial miniaudio initialization happens once on startup, which doesn't freeze & runs through as expected for the user
https://github.com/Chatterino/chatterino2/blob/5c8c05b/src/controllers/sound/SoundController.cpp#L32-L134
When we try to play a sound, the device reports as stopped so we attempt to start it, which is what freezes, can be found here: https://github.com/Chatterino/chatterino2/blob/5c8c05b/src/controllers/sound/SoundController.cpp#L178-L224
We use an
ma_engine
for playing a custom sound if the user has selected one, orma_sound_start
for our built-in sound. Both share the same device.Our repo's bug report as a reference: Chatterino/chatterino2#4832
Beta Was this translation helpful? Give feedback.
All reactions