Install pavucontrol, on my system it came with pulseaudio.
Add a dummy audio device (basically a virtual soundcard): sudo modprobe snd-aloop. This uses alsa's module which for me uses less than half the CPU time as pulseaudio's null-sink module, that's why I prefer it. To use the pulseaudio module instead, run: pactl load-module module-null-sink
Open pavucontrol (GUI application).
Navigate to Input device and select All Input Devices from the dropdown at the bottom.
Navigate to the recording tab and find your recording App. (e.g. Discord) there, set its audio input to Monitor of Built-in Analog Stereo.
Go to the Playback tab, now play whatever song/sound you want played on discord.
Select Built-in Audio Analog Stereo as the audio output of the desired application.
That's it. You can make it as loud as you want now, the audio will directly and only go to discord.
If you want to listen in live (at any volume) while it's playing look at the answer to my question here.
VB-CABLE is a virtual audio device working as virtual audio cable. All signals coming in the CABLE input is going to the CABLE output. Then It becomes simple to make computer audio recording or to connect a player application to a recorder one.
2. DIY solution:
For those who'd like to create own solution, one can use examples from WDK that available for
On Mac you may try Soundflower, this is open source, and it creates supplementary audio inputs and outputs:
- Sounflower (2ch)
- Soundflower (64ch)
and within your apps pref pane you can chose which one to use.
Look to https://github.com/mattingalls/Soundflower
It alloys you to take the output from any application and route it to the input of any other program. It is not freeware but you can download and ue it to record up to 10 minutes of sound before it overlays some noise on the file. Cost is $60.
I am not aware of any open source software that does this on a Mac.