Source

Thread

1/ @NOTimothyLottes

Following the succession (thanks) of re-trying WASAPI using this example which has been pre-minimized and de-C++‘ed: https://gist.github.com/mmozeiko/5a5b168e61aff4c1eaec0381da62808f#file-win32_wasapi-h - But I’m missing something on how to get the C++ as C linking to function (cross compiling), doesn’t easily work out of the box.


2/ @NOTimothyLottes

Of course I’m missing the magic header that does the real work … curious how messy this will get


3/ @NOTimothyLottes

So instead of the massive “mmdeviceapi.h” mess-ware, I defined a stupid CPP_(object,virtual_function_number) macro. This way I just have to write down the index in the VT table for the specific virtual function …


4/ @NOTimothyLottes

Here is initial bring up, function call by function call. No headers, and no C++. The magic of typecasting at usage IC4_(CPP_(… is that I don’t ever have to build the headers. That is at least working out well. I do line by line to test in Wine, defer fail handling until later


5/ @NOTimothyLottes

More on bring-up. I just run and check visually for output in the console (this time ‘B055’). Since compile times are under a second, it is super fast to check as I go. Easy to see how much code bloat there is for C++ this way (doing it manually).


6/ @NOTimothyLottes

Example below of how much header bloat I’m factoring out using my simple macros

0 items under this folder.