Can I use my PC as an audio device for my Android phone? I know it is possible to play music from my Android using the PC as the output device. This takes place over the local Wi-Fi network. However, the solutions given here don't work for me, since they are limited to playing music files, and one isn't even available in my country.

Is there a way for me to connect the Android and the PC, such that all sound the device generates from any application uses the PC as the output device?

I do not have Bluetooth on my PC, though I'm aware that if I did, I could probably use that.

I have Jelly Bean 4.1.2 on a rooted Droid RAZR MAXX, so solutions requiring root are OK. Though I would rather not replace the firmware if I can avoid it. It's also OK if the solution involves the USB cable.
A good app for this is BubbleUPnP for DLNA/Chromecast

Unlike other media server apps, it supports a lot of devices:


Chromecast, Chromecast Audio, Nexus Player, Nvidia Shield, and other Google 
Cast devices
DLNA TVs and music receivers from popular TV and HiFi brands
Xbox 360 and One, Playstation 3 and 4(**)
Amazon Fire TV and Fire TV Stick
local Android playback


It possess both media servering and rendering functionalies so your audio will be pushed to the playback DLNA device e.g TV and can do vice versa. 

Unfortunately you'll need root to enable Audio Cast, and the popular Xposed Framework tool BubbleUPnP (Audio Cast)  as well. You don't need to download an extra module - the Xposed module for Audio Cast is included in the standard BubbleUPnP app. 

Credits


BubbleUPnP