-
Notifications
You must be signed in to change notification settings - Fork 24
Troubleshooting
Output underflow means that remoteAudio was not able to provide an entire sound sample to the DAC of the sound card. The data had to be padded with zeros (silence).
Input overflow means that remoteAudio was not able to read the entire sound sample from the sound card. The particular sample has been dropped.
If too many Outputunderflows or InputOverflows happen there are a few measures you can take:
remoteAudio allows you to specify the buffers (latency) for input and output devices (in milliseconds). Try to make the buffers as low as possible. In the case of Underflows / Overflows increase the buffer size. On Linux and MacOS 5ms are typically sufficient for build-in / external USB sound cards, even on small embedded devices. On Windows the latency might have to be set higher (25-30ms). Changing the hostAPI might also help. On Windows, the MME hostAPI is known to cause a lot of latency while the more modern WSAPI has a much lower latency.
You can set the sound card's input/output buffers (latency) and hostAPI either through the command line
$ remoteAudio client nats --input-device-latency 10ms --output-device-latency 10ms --input-device-hostapi WSAPI
or in the sections [input_device]
and [output_device]
of the config file (typically located at $HOME/.remoteAudio.toml
)
[input_device]
device-name = "default"
samplerate = 48000
latency = "5ms"
channels = 2
hostapi = "default"
[output_device]
device-name = "default"
samplerate = 48000
latency = "5ms"
channels = 2
hostapi = "default"
Modern CPUs support variable frequency rates. They scale up when CPU power is needed and scale down to reduce power consumption. Since remoteAudio is working with extreme low latencies, a sudden reduction in CPU frequency might result in Output underflows or Input overflows.
On Linux this is managed by the CPU Governor. The easiest way to change the CPU governor profile is by using the cpufrequtils
service.
On most systems this should be installed by default. You can then edit the CPU performance characteristics in
$ sudo vim /etc/default/cpufrequtils
and increase either MIN_SPEED
or changing the GOVENOR
profile from interactive
to performance
. Another option might be to disable the CPU Governor completely.
After modifying the settings, you have to restart the service:
$ sudo systemctl restart cpufrequtils.service
Please be advised that this will result in a higher power consumption. On embedded devices like the Raspberry Pi or similar, a heat sink or and/or a fan might come in handy to ensure reliable operation.
On Windows you could try to change the Power Settings Profile.
Another way to reduce Input Overflows and Output Underflows is to increase the Process Priority. This link explains in detail how to change the priority of Linux Processes
When executing aplay -l
no sound card is shown. However sudo aplay -l
shows the audio devices.
In this case, your user has to be added to the group audio
.
$ sudo adduser <username> audio
Then close the session and log in again.