So basically I was able to use my raspberry pi as a bluetooth audio out device that is, connecting a speaker via audio jack I'm able to make it a Bluetooth speaker. I'm wondering if there's a specific protocol/package/anything that allows the same using wifi, as my bluetooth connection feels pretty slow always. I intend to use my phone's wifi hotspot and use the pi as a reciever that reroutes the audio to the 3.5mm out just like bluetooth. I'm running a raspian stretch on my raspberry pi 3B+. Thanks in advance!
shairport-sync and it will advertise an RAOP (AirPlay 1) service on your WiFi. Apple gear will all detect this and offer it as an audio destination, Linux, Windows and others can too.