WASAPI uninitializes COM from a different threads
CoInitializeEx and CoUninitialize function should be called from the same thread. However the wasapi prepare is called from a working thread after pipeline start, while the unprepare function is called from the main loop after pipeline stop.
This could break the COM initialization, for example in our application the device listing doesn't work anymore.
The issue can be verified by printing the thread-id from these lines