Capturing an audio window in C #

Is it possible to programmatically record the sound effects of a window in C #? Is it a bit like recording something from the “what you hear” or “stereo output” function (without having to select them)?

+2
source share
3 answers

This is called loopback recording , and it is possible on Windows. If you have a sound card that supports loopback (I just tested it on my younger Toshiba laptop, and it’s not), you can record directly from your loopback device using the waveInOpen API, etc., which is easy to use in C # , Note: Recording sound in this way necessarily results in lower quality, since the audio signal is converted to analog for output, and then re-digitized to support the loopback interface.

If you do not have a sound card, WASAPI will allow you to do this. I suppose WASAPI can be used with C #, but it looks painful.

+5
source

I'm a bit late for the party, but CSCore has a pretty large library for managing Windows sound events in C #.

This, in particular, looks like what you want. http://filoe.imtqy.com/cscore/sharpDox/1.2.0-release/#type/WasapiLoopbackCapture

0
source

Source: https://habr.com/ru/post/906249/


All Articles