Sometimes you want to use a device and watch a video at the same time and you need to use headphones. In such cases it would be useful to pass the sound through your computer to your headphones without some sort of external mixing because reasons. On Linux this is actually very easy. You can use the pulsaudio(pavucontrol)'s loopback function to pipe a microphone or any other audio source through the microphone jack to the headphone jack. There is actually only one command needed. I use a bash file and created a menu entry so I can open it like a normal program. You can the audio-mixing of your desktop to controll the volume of the passthrough. Just use the microphone volume setting on your system. And YES this only works on Linux and WSL
Plug an AUX cable into your device's headphone jack and the other end into your computer's microphone jack. And yes, you can even use Bluetooth with this. IDK how good this will work or what input and output you need to set but it works.
You need to install pavucontrol.
Now you can pipe the sound through. Normally it automatically recognizes what you are trying to do. If that is right then this command is enough:
pactl load-module module-loopback
If it doesn't work right automatically, then you need to use this command and change source and sink until you find the right source and output (Be careful! Sometimes you pipe some random noise through and that can be very VERY LOUD!):
pactl load-module module-loopback source=1 sink=0
You will notice that the command dose not wait for your input and the service runs in the background. To stop the passthrough you need to stop the service:
pactl unload-module module-loopback
To make it easy to use you can create a bash file:
"latency_msec=1" can be used if your pass-through does not sound clean for some reason.
That's it. If you create a menu entry you can start/exit it way more easily. With programs like menulibre (or you do it manually) it's done in seconds. Here is the command I use to start the bash file:
gnome-terminal -- /PathToTheBashFile/Mic2Speaker.sh