cntools / cnfa

Foundational audio drivers
MIT License
32 stars 16 forks source link

WASAPI Input Support for CNFA #5

Closed CaiB closed 4 years ago

CaiB commented 4 years ago

It's finally in a state where I'm comfortable making a pull request. :tada: There are definitely still issues and shortcomings in this driver, but all of the ones I'm aware of are documented in comments (marked TODO).

As of now, only input (WASAPI -> CNFA) is supported, from capture devices (e.g. microphones), and render devices (e.g. speakers) operating in loopback mode. Output (CNFA -> WASAPI) is currently not supported, but I will work on getting this done as well.

So far I have only tested this with ColorChord, and it seems to work well there. Thanks to Sam, it also compiles and runs fine with TCC. ColorChord needed a few tweaks to get some stuff working right, I'll submit a PR for those changes soon as well.

Take that, past me. Also, funny Charles, 50-60 lines?

Many thanks to @sellicott for his help!

cnlohr commented 4 years ago

This looks good. I will try to fix the WinMM stuff later.