Skip to content

Recording multiple audio in a session messes up my COM, am I doing something wrong? #502

Answered by mackron
ahmadharis4u asked this question in Q&A
Discussion options

You must be logged in to vote

I don't have an exact answer for you. But I can see you've initialized an engine with ma_engine_init(), but I can't see an ma_engine_uninit(). Maybe look at that?

miniaudio will initialize and uninitialize COM in two places - one is whenever a ma_context is initialized and uninitialized and the other is in the worker thread. You can see them in ma_worker_thread() and ma_context_init_backend_apis__win32() / ma_context_uninit_backend_apis__win32(). There's no bugs with the way miniaudio is doing it from what I can tell. If you need to customize the value that's passed into CoInitializeEx() you can do so by overriding MA_COINIT_VALUE:

#define MA_COINIT_VALUE 0 // <-- Set this to your desired…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mackron
Comment options

@ahmadharis4u
Comment options

@mackron
Comment options

@ahmadharis4u
Comment options

Answer selected by ahmadharis4u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants