LOOPBACK AUDIO CODE
This might complicate the code a bit, however it would result in much better consistency across all platforms (not sure if macOS supports this kind of recording). However I think that the optimal solution would be to isolate the "loopback devices" and "monitors" in a different class (much like _Microphone and _Speaker, there would be a separate class named _Loopback). I think it isn't that bad to just have separate functions for windows-specific functionality. Additionally I think it wouldn't make it simpler, because you would have to differentiate between platforms in the application code. This does not interrupt audio played by pulseaudio, it just records it as if it were also an input device.I was thinking in this direction, however it would be a little counter-intuitive due to the naming being a bit backwards, because "loopback devices" are actually speakers and not microphones. If you select this "Monitor" as your audio input device, that application will no longer record audio from microphones, but will capture any audio sent to your sound card. One of those options will read, "Monitor of ".
![loopback audio loopback audio](https://beatlabacademy.com/wp-content/uploads/2020/03/loopback-audio-1-1024x657.png)
You can click this button and change it to any audio device you wish such as a different microphone. You'll notice that there's a button next to each application that displays the device it is listening on for audio input. You can set it lower if you want, but the volume at which audio is played by your system is the volume at which it will be recorded.
![loopback audio loopback audio](https://i.ytimg.com/vi/e8Kn6_RJIck/maxresdefault.jpg)
LOOPBACK AUDIO SOFTWARE
Make sure your software volume output (the volume level in pavucontrol, not the volume knob on your external speakers) is set to 100%, but not more than that in order to avoid distortion. In the capture settings for your application, enter the audio capture device as "pulse".Īfter you've verified that your recording software is indeed listening for input using pulseaudio and it appears in the recording tab of pavucontrol, we can now change where it listens for input. If your application is actively recording, but does not appear in the recording tab of pavucontrol, then it is not using pulseaudio for this purpose. Remember the application has to be actively recording audio input, so if you're using something like gtk-recordmydesktop, it must be actively capturing your screen to appear here. In the "Recording" tab, you will see a list of all applications currently listening for audio input. The tab we're interested in is the "Recording" tab. You'll notice at the top of the window several tabs. Once pavucontrol is installed you can use it to change a variety of options regarding your sound, more-so than the default sound manager in most desktop environments.
LOOPBACK AUDIO INSTALL
One method you can use to accomplish this is to ?install and use the software package pavucontrol, which is available in the Debian repositories, by executing: # apt-get install pavucontrol This could be useful for screen recording sessions where you want to capture the audio as it is produced instead of just setting an external microphone next to your speaker.
![loopback audio loopback audio](https://www.synthax.co.uk/latest/wp-content/uploads/2020/04/RME-Fireface-802-Loopback-Activated-Synthax-Audio-UK.jpg)
![loopback audio loopback audio](https://i.ytimg.com/vi/WsDwj6SENOE/maxresdefault.jpg)
Pulseaudio provides us with the means to easily create an audio loopback device that allows us to record sounds produced by our system as if they were being redirected into the microphone.