libsoundio icon indicating copy to clipboard operation
libsoundio copied to clipboard

Capturing system audio (loopback support)

Open marioortizmanero opened this issue 5 years ago • 3 comments

For what I've seen, libsoundio is only able to record inputs. You can't for instance record your desktop audio. Are there any plans on supporting this? On PulseAudio I've done it with ffmpeg, so it must be possible. Similarly, Windows lets you do it with WASAPI.

marioortizmanero avatar Apr 14 '20 10:04 marioortizmanero

With pulseaudio, you can access the monitor source created for each sink like a classic source.

It is possible to do this with WASAPI but it is not supported by libsoundio. I'm planning on working on this for one of my project by using this PR from rtaudio as a base: https://github.com/thestk/rtaudio/pull/162/files

geekuillaume avatar Apr 21 '20 11:04 geekuillaume

For MacOS, you can use https://github.com/ExistentialAudio/BlackHole to create a loopback device, it's not as easy as what we can do with WASAPI or PulseAudio but should work well for some usage.

geekuillaume avatar Apr 23 '20 14:04 geekuillaume

Hey, thanks a lot for the suggestions. For now it might be best to use rtaudio + BlackHole because these are already available. Best of luck on your project!

I'm keeping this open in case anyone wants to update the loopback progress for libsoundio.

marioortizmanero avatar Apr 23 '20 15:04 marioortizmanero