492 Commits
Author SHA1 Message Date
Mike Brady 827504a3ff Reinstated the main thread cancellation cleanup and hooked it up the the exit function. Made the exit function work properly if libdaemon was included and either used or not used. CLeaned up some debug messages and warnings. 2020-06-21 13:20:08 +01:00
Mike Brady c0e5d0473e Add the ability to direct logs etc. to a file or pipe. 2020-05-28 12:19:59 +01:00
Mike Brady 6406c296f5 Add setting to direct logs to syslog, STDERR or STDOUT 2020-05-27 16:21:35 +01:00
Mike Brady e8ef0e9371 rewrite the non_blocking_write to not use poll() and to return immediately if there is no reader at the end of the pipe. 2020-05-25 12:48:39 +01:00
Mike Brady c1f973dde7 Remove the fsync calls from stdout and pipe backends. Slight edits to man file. 2020-05-24 19:47:04 +01:00
Mike Brady 54d761ff7d Clean up some of the wording and layout of the configuration file
Clean up and improve the way lead-in sillence is used to give a more accurate sync time to the first packet of audio.
Allow very good sync to occur with 0.3 seconds of lead-in silence.
Improve the use of the buffer offset.
Format some other files.
2020-05-18 16:55:09 +01:00
Mike Brady 012dd26c77 Add the ability to set the silent lead-in parameters initial_period, minimum number of adjustments and adjustment interval, and give them sensible defaults. 2020-05-17 12:48:25 +01:00
Mike Brady a4edc649f8 Add code to do calculations involving the audio_backend_latency_offset_in_seconds and audio_backend_silent_lead_in_time settings correctly. Clean up the audio_backend_silent_lead_in_time setting by adding an "auto" setting. 2020-05-16 12:23:08 +01:00
Mike Brady 72d7153529 Fix calculation of latency -- honour the signs of the offset and account for the DAC buffer size. 2020-05-14 19:51:32 +01:00
Mike Brady 1b7e23c093 Add ability to set the missing DACP port scan interval. 2020-03-25 10:40:05 +00:00
Mike Brady a6acb6062a If the DACP port is zero, do a zeroconf re-broswe every two seconds in case it has been missed. 2020-03-25 10:16:21 +00:00
Mike Brady 67e9b1b6cd partial move to using a nanosecond-based system timer. More to come. 2020-02-24 19:40:44 +00:00
Mike Brady 537158571f Add a SIGCHLD handler to reap zombie processes generated after script invocations where wait_for_completion is set to "no". 2020-02-11 22:44:07 +00:00
Mike Brady b88c9255b7 Fix a few compilation bugs. Thanks Travis. 2019-11-11 22:06:44 +00:00
Mike Brady f2930387b3 Add D-Bus convolution filter controls; enable convolution filters to be turned on and off or changed; enable convolution gain to be checked and changed. 2019-11-11 21:45:29 +00:00
Mike Brady 2f2442f4aa Fix D-Bus loudness switch silencing output. Rename LoudnessFiulterActive to Loudness. Add Convolution, ConvolutionGain and ConvolutionImpulseResponseFile properties to the D-Bus interface. 2019-11-10 18:05:59 +00:00
Mike Brady e0ffb18dbf Modify behaviour when receiving an invalid RTSP packet to be the same as a genuine AirPort Express, but time out after two minutes anyway. Also move the retain_artwork flag to diagnostics. 2019-10-26 16:11:54 +01:00
Mike Brady 41de3e5c39 Fix a small conditional compilation flag error 2019-10-20 22:04:29 +01:00
Mike Brady 6c57ce97d5 Add two cover_art control settings -- the cache directory to use, (or the empty string to prevent caching) and a flag to retain all art work 2019-10-20 15:43:31 +01:00
Mike Brady 686fc2a5c1 Add missing frame status field, fix a bug with the first missing frame variable, expose the settings for resending, remove some commented out code. 2019-10-10 09:23:20 +01:00
Mike Brady e2294decb1 Squashed commit of the following:
commit 3dda7928b6df6ba7febc20f22faff5c8be024ef4
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sun Sep 22 20:59:50 2019 +0100

    Update RELEASENOTES-DEVELOPMENT.md

commit 153eb84cff292bd127c516e6486ba9c1f9a3ce16
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sat Sep 21 19:30:26 2019 +0100

    Update RELEASENOTES-DEVELOPMENT.md

commit b574d49b37f874cc7b91163a81fcb9dc6c760ef4
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sat Sep 21 19:03:13 2019 +0100

    Update RELEASENOTES-DEVELOPMENT.md

commit bce0613283e233ddfa24d080adff3450b4ddd909
Author: Mike Brady <mikebrady@eircom.net>
Date:   Sat Sep 21 18:59:18 2019 +0100

    Update configure.ac

commit 7dc145361186806a560495d8171a387f5856f2f0
Author: Mike Brady <mikebrady@eircom.net>
Replace the code for determining when resends should be sent for missing audio packets.

Multiple sequential resend requests are now rolled up into one.

Should address Issue #865.
2019-09-22 21:04:07 +01:00
Mike Brady db8f10cfa1 add the option (normally on) of including the file name and line number of the originrating message in a debug log message 2019-09-17 12:14:55 +01:00
Mike Brady bd84702d84 Remove reference to non-existent stop_mpris_service(). 2019-09-10 16:10:30 +01:00
Mike Brady c7a290c36a remove a call to a non-existent terminate_mqtt function in the clean-up. 2019-09-10 09:29:21 +01:00
Mike Brady 185000d0bd Remove some old code and clean up the exit cleanup function so that it works better with libdaemon and its parent and child processes 2019-09-08 17:03:36 +01:00
Mike Brady daab7a634c Clean up the scanning code for detecting either a standard DACP server or an advanced DACP server. 2019-09-04 20:24:34 +01:00
Mike Brady a3a1884f71 Remove obselete SIG setup and action stuff 2019-09-04 09:19:44 +01:00
Henrik Nilsson 14de9e27ab Return success on version and help argument
It's not a failure to print version or usage, so use return code
success.
2019-08-01 10:16:37 +02:00
Henrik Nilsson 2e7e5b6856 Check help and version argument early
Check for the help and version arguments makes sure that it's
always possible to get the version and usage even if there are
issues in other parts of the code.
2019-08-01 10:16:37 +02:00
Chris Boot b9cf91b2bb More typo fixes across the tree
Previously I have made spelling changes as caught by Debian's lintian
tool, which has a short list of common misspellings that it tests for.
This time I decided to run codespell against the source and fix all the
obvious problems it came up with. It also uses a list of misspellings
but it's much larger than lintian's, but also has some false positives
so I went over the list by hand.

The command I used to do check the source was:
git ls-tree -rz --name-only HEAD | xargs -0 codespell -L minimise,errorstring
2019-07-27 00:05:38 -03:00
Mike Brady 336e1bb1c3 remove some detritus 2019-07-22 13:34:35 +01:00
Mike Brady 175ae0a650 Fix a bug that sometimes caused a crash when a service name was specified in the configuration file. The fix was to be more systematic in allocating and deallocating memory for termporary strings. Thanks to Chris Boot, Ari Sovijarvi and Jeroen Massar for the bug report. Fixes Debian Bug report #925577.
Allow the rtsp_listen_loop to exit if the RTSP port (usually port 5000) is not available. This allows the system to exit cleanly rather than abort.
2019-07-21 09:06:37 +02:00
Mike Brady c8b0be30b4 find . \( -name \*.cpp -or -name \*.h -or -name \*.c \) -exec clang-format -i -style='{BasedOnStyle: llvm, IndentWidth: 2, ColumnLimit: 100}' '{}' \; 2019-06-19 19:06:54 +01:00
David Crook 19fbededcf mqtt port config changes
1. update example shairport-sync.conf file
2. update config file mqtt port parsing

Signed-off-by: David Crook <idcrook@users.noreply.github.com>
2019-05-25 13:01:22 -06:00
Mike Brady 9fd4a39729 check for a couple of divide-by-zero possiblities. 2019-05-19 13:53:25 +01:00
Till Zimmermann 90f34a7139 Fixed Typos 2019-05-09 12:37:09 +02:00
Till Zimmermann 60b9347a00 Fixed Cover Bug, checking dependencies 2019-05-09 11:59:02 +02:00
Mike Brady 83c0405d03 Add automatic bit depth and speed selection for alsa devices. Set rate and format to "auto" by default. Always look for the greatest bit depth, but the lowest multiple of 44,100.
Improve support for big-endian CPUs by adding support for explicit -endian formats, i.e. S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE.

For the "disable_standby_mode" setting, change "while_active" to "auto".
2019-05-07 10:19:04 +01:00
Mike Brady 1d32976d07 Improve support for bigendian devices. Add support for S16_LE, S16_BE, S24_LE, S24_BE, S32_LE and S32_BE formats. Make the default S16_LE. Allow precision timing only on alsa devices with names beginning with "hw:". Use snd_pcm_hw_params_is_monotonic() to see if clock is monotonic. 2019-05-01 11:01:15 +01:00
Mike Brady 8568b58b49 Tidy up some debug and information messages 2019-04-17 16:33:08 +01:00
Mike Brady a69aedf225 Take a fixed amount of time to check the soxr_delay_index, not a fixed number of iterations. 2019-04-16 23:11:30 +01:00
Mike Brady 9aa8f91c0e Add a new interpolation setting -- "auto" which will choose soxr if supported and the soxr delay is less or equal to the threshold of 30 (milliseconds). 2019-04-16 16:40:56 +01:00
Mike Brady ca8acb4a3f Move the soxr timer checker to run as soon as the system powers up. 2019-04-16 12:59:02 +01:00
Mike Brady 1b1348e1ac Add git commit and dirty status if available. Slightly reorder the debug messages at the start. 2019-04-15 16:27:44 +01:00
Mike Brady 16235071ee Default to "basic" stuffing even if soxr support is included. 2019-04-15 11:13:51 +01:00
Mike Brady 57bcea52c7 Tidy up the exit() arguments. 2019-04-10 21:32:08 +01:00
Mike Brady 6d088ac4d9 reinstate the development branch README.md, stop including libdaemon automatically, improve some erro messages concerning -k / -d options. 2019-04-05 16:21:58 +01:00
Mike Brady 91c63e4aad Quieten a debug message 2019-03-19 16:10:04 +00:00
Mike Brady 593c507d50 Correct the behaviour when daemonised --the parent was deleting the PID file when it exited. 2019-03-19 16:04:21 +00:00
Mike Brady a347771fce show audio_backend_buffer_interpolation_threshold_in_seconds in debug message 2019-03-16 11:59:49 +00:00