Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


BLuetooth Headphone and Airplay
#2
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.

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
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 11:50 AM
RE: BLuetooth Headphone and Airplay - by Tim Curtis - 06-18-2020, 01:15 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 03:54 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 04:22 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 05:21 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 06:04 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 07:57 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 09:32 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-18-2020, 09:34 PM
RE: BLuetooth Headphone and Airplay - by mancio61 - 06-19-2020, 09:55 AM
RE: BLuetooth Headphone and Airplay - by fdealexa - 08-06-2020, 12:57 AM

Forum Jump: