Closed Lazrius closed 8 months ago
While putting together a minimal example, I have come across this stackoverflow post, which seems to be the root cause.
Closing this as it's not directly related to miniaudio, but it might be a helpful thing to add a note of this to the readme! Thanks again, sorry for bothering.
Heya. I am having an issue using Miniaudio where the program hangs when trying to terminate.
Project Context:
The summary is that I have a MoviePlayer class that handles the rendering of frames (using FFMPEG) and playing of audio (using miniaudio). When this class is being deconstructed, I call the relevent cleanup functions, but when it gets around to calling ma_engine_uninit, it tries to clean up the device which waits forever for a thread to terminate that never does. This leads to my application closing correctly, but actually existing in the background and never properly terminating.
I am using the following
ma_
types:vector<unsigned char>
for the buffer.My constructor looks like so:
My destructor looks like the following:
The audio buffer is constructed like so:
In the destructor StopMovie calls
ma_sound_stop(&miniAudioSound);
andma_sound_uninit(&miniAudioSound);
, as well as other FFMPEG functions for the video encoding. I have been looking at this for a really long time, and have not seen anything in the documentation that might indicate why this is happening.The callstack looks like the following when it tries to termiante:
If you have any ideas or need any more information please do say. Thank you very much for your project.