https://play.google.com/store/apps/details?id=com.kaytat.simpleprotocolplayer&hl=en
https://github.com/kaytat/SimpleProtocolServer
This media player plays uncompressed PCM data from a server over your local network. This is meant to be used for streaming audio from a PC to your Android phone or tablet. The focus has been latency and so all the options are intended for the user to be able to find a compromise between latency and quality.
As a rule of thumb, a low sample rate + mono + 50 ms or less of buffer time are the settings that are generally used.
This project is based on an old version of this Android example: https://github.com/googlesamples/android-MediaBrowserService
- Allow PERFORMANCE_MODE_LOW_LATENCY for Android O and above
- Allow use of
minimal buffer size
as reported by AudioTrack.
- The idea here is to allow Android to dictate the buffer size and so the user don't have to tweak the ms delay setting.
The following web page describes how to configure PulseAudio for use with this player. http://kaytat.com/blog/?page_id=301
-
On demand with enabled pipewire-pulse using
pactl
from pulseaudio-utils:pactl load-module module-simple-protocol-tcp rate=44100 format=s16le channels=2 record=true port=4711
-
Permanently through config file
/etc/pipewire/pipewire.conf.d/simple-protocol.conf
:
context.modules = [
{ name = libpipewire-module-protocol-simple
args = {
capture = true
audio.rate = 44100
audio.format = S16LE
audio.channels = 2
audio.position = [ FL FR ]
server.address = [
"tcp:4711"
]
}
}
]
(https://docs.pipewire.org/page_module_protocol_simple.html for reference)
Download the server from the github link above and run it locally. The server has some options also to help tune the performance.