The sound mirroring from PC to smartphone has many interesting applications. For example, use your smartphone as a wireless speaker, listen to music or movies from another room, as a continuation of the audio system.
This is autotranslated version of this post.
This problem has several solutions depending on the operating system on your computer and smartphone. If you have a Chromecast or Bluetooth on your PC, you can easily do it with system settings.
SoundWire (Android, Windows, Linux, Raspberry Pi)
If you have a smartphone on Android and computer on Windows or Linux, then you need SoundWire. Unlike competitors, the company promises the lowest latency.
You need to install the server part on the computer and the client on the smartphone.
In the desktop version of SoundWire you can select the audio source of your computer, the volume and output sound to the file. Remember the IP in the app.
Then you need to install the Android app and configure the connection to the computer. Usually, everything works out of the box: you need to click on the big button in the app.
In my case, I had a little problem with the settings. In the desktop version when you hover the mouse over IP address it displays all the address of your computer. You need them to specify one of them in the Android app. Then the sound will be immediately be duplicated on the smartphone. If not, try a firewall's settings.
Sound will be mirrored as 44.1 / 48 kHz stereo 16-bit compression PCM or Opus. The resulting file can be saved in MP3 or WAV. I did not notice any delay, as promised by the developer.
In the Android application, you can try the equalizer or advanced settings.
Airfoil (any device — Windows. macOS)
Airfoil more flexible analog of SoundWire. It can mirror sound to almost any device that supports AirPlay.
The server part of Airfoil is paid. Price starts from $34. For a test, you can download a free version.
As before, you need to install the server part on the computer. The file is signed and downloaded from the developer's server.
I immediately liked that you can choose the program from which to stream audio. Also, there is the equalizer. And the devices can be combined into groups and choose which of them to broadcast the sound.
Then you need to install the app on your smartphone. Here you set up the connection by toggle the switch to Recieve Audio. In the settings, you can adjust the volume of the source and other receivers of sound.
The sound comes with a slight delay and sometimes crackle. Desktop application likes to freeze for a few seconds. So sometimes it seems that the connection has not yet occurred. And when you change the volume on the device it can be difficult to return to its original state.