Hi
Thank you for the topic, with Ios9 sharport wasn't working anymore.
So i spend a few time to install shareport-sync and integrated it on rune (not perfect...)
runeui is working for :
Activated / desactivated Airplay
changing name
I have an issue program on start and on stop : airplay_toggle
I still have strange message
Do to this:
Install shareport-sync as describe in the first post
I have to install gcc tobeable to start shareport
I modify shairport-sync.conf
with :
in General part
general =
{
// name = "Shairport Sync Player"; // This is the name the service will advertise to iTunes. The default is "Shairport Sync on <hostname>"
// name = "Runeaudio-sync";
// password = "secret"; // leave this commented out if you don't want to require a password
// interpolation = "basic"; // aka "stuffing". Default is "basic", alternative is "soxr". Use "soxr" only if you have a reasonably fast processor.
interpolation = "soxr"
output_backend = "alsa"; // Run "shairport-sync -h" to get a list of all output_backends, e.g. "alsa", "pipe", "stdout". The default is the first one.
mdns_backend = "avahi"; // Run "shairport-sync -h" to get a list of all mdns_backends. The default is the first one.
// port = 5000; // Listen for service requests on this port
// udp_port_base = 6001; // start allocating UDP ports from this port number when needed
// udp_port_range = 100; // look for free ports in this number of places, starting at the UDP port base (only three are needed).
// statistics = "no"; // set to "yes" to print statistics in the log
// drift = 88; // allow this number of frames of drift away from exact synchronisation before attempting to correct it
// resync_threshold = 2205; // a synchronisation error greater than this will cause resynchronisation; 0 disables it
// log_verbosity = 0; // "0" means no debug verbosity, "3" is most verbose.
// ignore_volume_control = "no"; // set this to "yes" if you want the volume to be at 100% no matter what the source's volume control is set to.
ignore_voluem_control = "yes";
// volume_range_db = 60 ; // use this to set the range, in dB, you want between the maximum volume and the minimum volume. Range is 30 to 150 dB. Leave it commented out to use mixer's native range.
};
in alsa
alsa =
{
// output_device = "default"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc.
//output_device = "hw:1,0";
mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, volume in adjusted in software.
mixer_device = "default"; // the mixer_device default is whatever the output_device is. Normally you wouldn't have to use this.
// mixer_device = "hw:0";
// audio_backend_latency_offset = 0; // Set this offset to compensate for a fixed delay in the audio back end. E.g. if the output device delays by 100 ms, set this to -4410.
// audio_backend_buffer_desired_length = 6615; // If set too small, buffer underflow occurs on low-powered machines. Too long and the response times with software mixer become annoying.
};
Not sure this are the best choice.... But it's working
I modify :
run_sy_wrk ... just to use shareport-sync
// start shairport
if ($redis->hGet('airplay', 'enable') === '1') {
runelog("service: SHAIRPORT start",'');
//sysCmd('systemctl start shairport');
sysCmd('systemctl start shairport-sync');
and
// start shairport
if ($job->action === 'start') {
runelog('service: SHAIRPORT start');
// start or re-start shairport service
if (isset($restart)) {
// sysCmd('systemctl restart shairport');
sysCmd('systemctl restart shairport-sync');
} else {
//sysCmd('systemctl start shairport');
sysCmd('systemctl start shairport-sync');
}
$redis->hSet('airplay', 'enable', 1);
// send notfy to UI
ui_notify_async('AirPlay', 'AirPlay feature enabled', $jobID);
}
// stop shairport
if ($job->action === 'stop') {
runelog('service: SHAIRPORT stop');
//sysCmd('systemctl stop shairport');
sysCmd('systemctl stop shairport-sync');
$redis->hSet('airplay', 'enable', 0);
// send notfy to UI
ui_notify_async('AirPlay', 'AirPlay feature disabled', $jobID);
i update runeaudio.php
with :
//$file = '/usr/lib/systemd/system/shairport.service';
$file = '/usr/lib/systemd/system/shairport-sync.service';
//$newArray = wrk_replaceTextLine($file, '', 'ExecStart', 'ExecStart=/usr/bin/shairport -w --name='.$name.' --on-start=/var/www/command/airplay_toggle --on-stop=/var/www/command/airplay_toggle -o alsa -- -d '.$acard->device);
//$newArray = wrk_replaceTextLine($file, '', 'ExecStart', 'ExecStart=/usr/bin/shairport-sync -w --name='.$name.' --on-start=/var/www/command/airplay_toggle --on-stop=/var/www/command/airplay_toggle -o alsa -- -d '.$acard->device);
$newArray = wrk_replaceTextLine($file, '', 'ExecStart', 'ExecStart=/usr/bin/shairport-sync -a '.$name.' -- -d '.$acard->device);
runelog('shairport.service :', $newArray);
as you for the moment no more on start on stop....
and :
sysCmd('systemctl daemon-reload');
if ($redis->hGet('airplay','enable') === '1') {
runelog('restart shairport');
sysCmd('systemctl restart shairport-sync');
}
and:
// update airplayname
if ($redis->hGet('airplay','name') === $hn[0]) {
$redis->hSet('airplay','name', $newhostname);
if ($redis->hGet('airplay','enable') === '1') sysCmd('systemctl restart shairport-sync');
}
and
// reset shairport starter script
sysCmd('cp /var/www/app/config/defaults/shairport.service /usr/lib/systemd/system/shairport.service');
sysCmd('cp /var/www/app/config/defaults/shairport-sync.service /usr/lib/systemd/system/shairport-sync.service');
I hope i don't miss something....Not an expert
Regards