06-18-2020, 01:15 PM
(This post was last modified: 06-18-2020, 01:15 PM by Tim Curtis.)
I think it is possible but you will need to hack /var/www/inc/playerlib.php and then reboot.
In function startSps() make the following edit to the else block. Comment out the existing $device line and then add the new one that specifies 'bitstream' as the device.
Here's the complete function.
if it works for you maybe I can look at adding this capability for upcoming moOde 6.6.0.
-Tim
In function startSps() make the following edit to the else block. Comment out the existing $device line and then add the new one that specifies 'bitstream' as the device.
Code:
else {
//$device = 'plughw:' . $array[0]['value'];
$device = 'btstream';
}
Here's the complete function.
Code:
function startSps() {
// verbose logging
if ($_SESSION['debuglog'] == '1') {
$logging = '-vv';
$logfile = '/var/log/shairport-sync.log';
}
else {
$logging = '';
$logfile = '/dev/null';
}
// get device num
$array = sdbquery('select value from cfg_mpd where param="device"', cfgdb_connect());
$device = $array[0]['value'];
if ($_SESSION['alsaequal'] != 'Off') {
$device = 'alsaequal';
}
elseif ($_SESSION['eqfa4p'] != 'Off') {
$device = 'eqfa4p';
}
else {
//$device = 'plughw:' . $array[0]['value'];
$device = 'btstream';
}
// interpolation param handled in config file
$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 ' . $device . ' > ' . $logfile . ' 2>&1 &';
debugLog('worker: (' . $cmd . ')');
sysCmd($cmd);
}
if it works for you maybe I can look at adding this capability for upcoming moOde 6.6.0.
-Tim