WIP: Add WASAPI loopback capture devices - #421
CalcProgrammer1 wants to merge 1 commit into
Conversation
|
This would be very useful addition to OpenAL-Soft, thank you for the work! By the way, it would seem like you have unnecessarily changed the whitespace formatting in the CaptureDevices section, e.g. [name](const DevMap &entry) -> boolvs [name](const DevMap& entry) -> booland std::wstring wname{utf8_to_wstr(name)};vs std::wstring wname{ utf8_to_wstr(name) };and maybe more. These changes also got carried over to the new LoopbackDevices section. |
|
I can double check those whitespace issues. I'm guessing Visual Studio did its unnecessary auto-reformatting nonsense when I copy-pasted some code. |
|
From what I'm reading, this won't work on Windows versions prior to 10:
Which the record thread relies on to get samples properly. The suggested workaround doesn't seem very practical. |
This pull request adds loopback support to the WASAPI driver. It gets a list of render (output) devices when probing capture devices and sets a member flag to indicate they are loopback devices. It then opens them with the AUDCLNT_STREAMFLAGS_LOOPBACK flag. I was able to use alrecord.exe to record what was coming out of my speakers.
Doesn't work correctly when speakers are set to more than 2 channels. I have a 7.1 headset and having it in surround mode kept throwing an invalid format error.
I wouldn't merge this yet until I do more testing.