bastibe / SoundCard

A Pure-Python Real-Time Audio Library
https://soundcard.readthedocs.io
BSD 3-Clause "New" or "Revised" License
680 stars 69 forks source link

Fixes for issue #15 and Win 8 STA #89

Closed ghost closed 4 years ago

ghost commented 4 years ago

Win 8 STA CoInitialize: https://stackoverflow.com/a/49127178/5541355. _combase definition has been removed and has been replaced everywhere with _ole32. Althought I haven't tested this, it should work perfectly fine. Now this library will be perfectly compatible with all Windows versions from Vista.

bastibe commented 4 years ago

This looks very good, and would finally fix that long-standing incompatibility with Windows 7.

I just checked it on Windows 10, and it seems to work just fine. I can't test it on Windows 7 or 8, as I don't have those available.

bastibe commented 4 years ago

Thank you very much for this contribution!

Bob-Thomas commented 4 years ago

would this fix the issue of having to initialize com in a new thread as well ? or is that just standard expected behavior

bastibe commented 4 years ago

I have no idea, honestly. I don't know enough about .NET to, sadly. @ghost, do you know more about that?

demberto commented 4 years ago

@bastibe you don't need to know .net for this, its all win32 and com. Unfortunately it is a complicated topic and I am just a newbie here, anyways. @Bob-Thomas from what i know, COM library needs to be initialised separately in each thread by a call to CoInitialize/CoInitializeEx.