This app was mentioned in 8 comments, with an average of 1.50 upvotes
I use this app to control foobar2000 from my phone, it works incredibly well: https://play.google.com/store/apps/details?id=com.cav.foobar2000controller
For the latency question, I use values between 64-128 samples which translates to 3-5ms latency. There's a lot of variables involved here. You need a fast "single thread" processor (mine is 4790k, look here: https://www.cpubenchmark.net/singleThread.html ), you need to check the USB controllers on your motherboard, all the USB ports don't go to the same controller, there's USB2 vs USB3 which are obviously different controllers but you may have several USB2 controllers in your motherboard. Put your sound interface on one controller, with a few low bandwidth devices (keyboard, mouse, etc), and connect your usb disk drives, wifi dongles, webcams, anything that requires "some or a lot" of bandwidth on a different controller. You can go and check how your USB controllers are connected to the PCI Express lanes on your board, sometimes moving PCI-E cards to different slots can make a huge difference on performance. For example, my board has 3 "16x" PCI-E slots, but the third one is shared with my USB3 controller, and when I bought an NVME drive, that's where I installed it, and first, it wouldn't gi as fast as I expected, and all of a sudden I was getting half the usual speed on my USB3 drives... Moving the NVME drive to a different slot fixed that. So depending on how much effort you're willing to put and the hardware that you have, your mileage may vary. I'm an IT manager and I'm really passionate about my work and tend to go over the top a bit sometimes.
There's a 3rd party Android app that will do this, but it does its thing completely separate from the official Foobar for Android player.
https://play.google.com/store/apps/details?id=com.cav.foobar2000controller
Use foobar and either one of these apps on your phone: (Android) https://play.google.com/store/apps/details?id=com.cav.foobar2000controller&hl=en (iOS) https://itunes.apple.com/us/app/monkeymote-for-foobar2000/id409693155?mt=8
You will need to install some sort of mod in foobar but both can be done with ease and provided instructions. Listen away.
On top of what everyone else said, foobar2000 controller is a fantastic remote control for Android.
Without a server, what do you think the phone would be communicating with? I'm not trying to be a smart ass; the phone would need to send messages/commands to the computer, and there would need to be something running on the computer to receive those commands and interpret them.
foobar2000 has a built in webserver that you can enable, and there is foobar2000 controller that works really well with it. If you were to go this route at least you would only be using foobar's built in functionality without an additional server running.
I guess what you really want is for your phone's USB connection to emulate an HID device (like a physical keyboard). Something like this seems to be what you are looking for.
Well, you have a few options:
These are for Android, but upnp is widely supported across several mobile OSs.