Mike Brady
14bfba2724
Add code to check divisions and mods for a potrntial divide by zero problem. MAy cause SPS to terminate but leave a log message.
2021-11-21 21:47:32 +00:00
Mike Brady
04240708a9
Try using the monotonic clock for checking output rate...
2021-11-08 10:14:42 +00:00
Mike Brady
6beb73e99e
Allow debug/inform/die/warn messages up to 16384 bytes (up from 1024 bytes)
2021-08-23 12:57:56 +01:00
Mike Brady
23da206c7e
revert output to syslog rather than stderr
2021-07-30 19:15:17 +01:00
Mike Brady
67455c19d6
If using libdaemon logs default to daemonlog, otherwise to stderr.
2021-07-19 17:09:52 +01:00
Mike Brady
e925e196c8
Changes to allow it to compile in FreeBSD and fix a few issues that were picked up by clang 10.
2021-06-22 13:49:11 +01:00
Mike Brady
a109b587ec
Flush seems to be working properly and reliably. Some audio glitches removed too by dropping the first two AAC blocks of any passage. Crude. Flush diagnostic linked list stuff left in place.
2021-05-30 11:17:06 +01:00
Mike Brady
e1034e1131
Advertise the _raop._tcp service as well as the _airplay._tcp service. Use a real MAC as the basis for the device ID.
2021-05-24 12:07:05 +01:00
Mike Brady
2203d6a335
Start using automatic git-based versioning
2021-05-14 22:49:17 +01:00
Mike Brady
e8e81a8b07
fix a couple of compilation errors.
2021-05-12 10:57:50 +01:00
Mike Brady
7ae72d795f
add plist cleanup for pthread cleanup
2021-05-10 09:01:25 +01:00
Mike Brady
796b7da07c
Bringing across the extra AP2 components of common.h and common.c
2021-04-30 10:44:43 +01:00
Mike Brady
b3cec5c690
move over to clock_realtime from clock_monotonic. Seems to work.
2021-04-30 10:12:59 +01:00
Mike Brady
8a73d5972c
rtp meged with lots of AP2 stuff still commented out. But it still works.
2021-04-29 15:04:50 +01:00
Mike Brady
18c9e13a02
Clean up with clang-format
2021-01-24 21:32:57 +00:00
Mike Brady
5b95a4276f
Fix a hang if an on-*** script didn't launch.
2020-12-23 16:13:44 +00:00
Mike Brady
3fc9570489
Clang Format
2020-09-27 10:45:22 +01:00
Mike Brady
46c47c01a6
Ensure the metadata pipe is created, if necessary, when the --with-metadata option is chosen without dbus or mpris
2020-09-11 16:54:34 +01:00
Mike Brady
ca56287254
Make the first output backend in the list of backends the default and make its name the default output_name. Clang-format everything
2020-09-03 09:53:13 +01:00
Mike Brady
aa38f7820c
Add the word 'jack' to the version string if Jack Audi support is compiled in.
2020-09-02 17:27:36 +01:00
Mike Brady
bcddc6722e
Add the string "-alac" to the version string in '-V' if the Apple ALAC decoder is included.
2020-06-24 09:48:46 +01:00
Mike Brady
05beeaab22
Use exit() instead of abort() when a fatal error occurs, but skip the cleanup before exit, as this can cause trouble.
2020-06-22 10:16:37 +01:00
Mike Brady
526a86b732
remove an insignificant FreeBSD compiler warning.
2020-06-14 15:58:06 +01:00
Mike Brady
dfd90bac6b
Clean up code for the silent lead-in on a non-syncing back end e.g. a pipe. Clean up pipe creation and initial opening and associated error messages. Fix error with warning/die messages. Tidy up some debug messages.
2020-06-05 17:22:53 +01:00
Mike Brady
5decc1bb06
Make the pipe, hub and mqtt separate threads with their own metadata queues. If one blocks, no new metadata is sent to it and the others are unaffected.
2020-05-30 15:49:00 +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
9e34b1334b
Stop using home-brew non-blocking write. Instead, having opened the pipe non-blocking, change to blocking.
2020-05-27 15:02:49 +01:00
Mike Brady
ba4b6b66c6
Brown bag
2020-05-25 14:56:33 +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
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
218a4385f4
Tidy up timed mutex messages.
2020-03-24 15:57:16 +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
820ee1c9f2
Add a call to get the time in nanoseconds.
2020-02-23 11:46:07 +00:00
Mike Brady
ebb1d69ce0
Remove a redundant comparison
2020-02-22 18:24:57 +00:00
Mike Brady
d673f274cb
Don't use strndup as old versions of OpenWrt don't seem to have it
2020-02-20 18:24:04 +00:00
Mike Brady
6c72e52a07
Brown bag -- this is what 3.3.6d9 was supposed to do!
2020-02-19 14:34:29 +00:00
Mike Brady
f6ce0262a2
fix compaison between old and new metadata string -- check for lenghts, huh.
2020-02-19 09:34:17 +00:00
Mike Brady
f771774519
Compiles under gcc-10 with -fno-common
2020-02-13 17:37:41 +00: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
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
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
86b6d7bfff
Squashed commit of the following:
...
Fix Issue #890 -- https://github.com/mikebrady/shairport-sync/issues/890
Recognise situation where a track has no artwork properly.
Less likely to drop the 'availabile' property.
Always output the full metadata whenever any part of it has changed.
Metadata coming from dacp is now incorporated,
2019-08-29 11:47:49 +01:00
Mike Brady
a8faacd3fc
Expose some of the settings used in the disable_standby_mode.
...
Specifically, firstly, the disable_standby_mode_silence_threshold, which is the
amount of audio in the output device's hardware buffer. It should normally
be close to the value givein in the audio_backend_buffer_desired_length_in_seconds
setting. If it drops to this value, silence is added to the buffer to prevent
the output device from becoming idle.
Secondly, the disable_standby_mode_silence_scan_interval is the time between checks
of the output device's hardware buffer.
The code for generating frames of possibly-dithered silence has been simplified.
2019-06-20 10:45:27 +01: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
Mike Brady
85cc1bdd97
Fix the dither calculation -- it was 12 dB too high, really noticable on the U8 setting.
2019-06-02 17:56:47 +01:00
Mike Brady
7f2e6b1aac
Add support for S32_LE, S32_BE, S24_LE and S24_BE wqhen generating frames of dithered silence
2019-05-29 16:18:51 +01: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
19a1a28374
Add "auto" to interpolation settings. Time a few soxr_oneshots to get a figure for soxr_delay_index. Add a soxr_delay_threshold and in auto mode, select soxr if delay is below threshold.
2019-04-21 14:25:27 +01:00