Moode Forum
shairport-sync a way to disable soxr interpolation ? - Printable Version

+- Moode Forum (http://moodeaudio.org/forum)
+-- Forum: moOde audio player (http://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Feature requests (http://moodeaudio.org/forum/forumdisplay.php?fid=8)
+--- Thread: shairport-sync a way to disable soxr interpolation ? (/showthread.php?tid=858)



shairport-sync a way to disable soxr interpolation ? - gibman - 01-02-2019

I see that that "soxr interpolation" option is hardcoded into the cmdline that starts shairport-sync

For gen1 rasp pi's it could make sense to run it without soxr in order to avoid CPU spikes that can be heard as garbled audio.

could you make SOXR an option instead in the web UI ?

more specifically : -S soxr

thanks
gibman


RE: shairport-sync a way to disable soxr interpolation ? - Tim Curtis - 01-02-2019

Last time I tested a Pi-1B I did not experience any issues or audio glitches with Airplay.


RE: shairport-sync a way to disable soxr interpolation ? - gibman - 01-03-2019

To quote Mike on:
https://github.com/mikebrady/shairport-sync/issues/772#issuecomment-443257152

"Would you mind using basic rather than soxr interpolation, as sometimes if there's a lot of interpolation, the soxr calculation can seriously bog down the processor?"

I must say it has a profound effect on my old PI 1 boxes.
htop shows 100% cpu usage from time to time on the shairport-sync process. With soxr turned off I'm back to around 10% and audio is intact.

Ive patched the playerlib.php locally :

//$cmd = '/usr/local/bin/shairport-sync ' . $logging . ' -a "' . $_SESSION['airplayname'] . '" -S soxr -w -B /var/local/www/commandw/spspre.sh -E /var/local/www/commandw/spspost.sh ' . '-- -d hw:' . $device;

$cmd = '/usr/local/bin/shairport-sync ' . $logging . ' -a "' . $_SESSION['airplayname'] . '" -w -B /var/local/www/commandw/spspre.sh -E /var/local/www/commandw/spspost.sh ' . '-- -d hw:' . $device;

works a lot better now for me atleast.
with soxr and a more stressed CPU I would get small audio interruptions that would eventually stall my digi+ I2C DAC in a way that would require me to manually boot the device.
ofc. Im also running the latest shairport-sync from the dev. branch


RE: shairport-sync a way to disable soxr interpolation ? - Tim Curtis - 01-03-2019

Hi,

it's a relatively easy modification since there is already some deprecated code and sql columns in the Airplay feature that can be reused for a new "interpolation" param.

Look for the setting in upcoming moOde 4.5 update :-)

[attachment=462]

-Tim