Commit Graph
226 Commits
Author SHA1 Message Date
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 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 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 f5eceff6f7 Store clock drift information for each client based on its IP. This is stored in RAM, not on disk. Used at the start of a new session until new clock drift data is ready. 2020-06-11 12:09:55 +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 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 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
Guillaume Revaillot aacc4e802b Allow to specify pulseaudio server instead of using default one.
Add "server" entry to pa config section, allowing to connect to a remote or a local system
pulseaudio instance instead of letting pulseaudio choose.
2020-03-27 09:39:11 +01: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 218a4385f4 Tidy up timed mutex messages. 2020-03-24 15:57:16 +00:00
Mike Brady e1028b2c89 Hide get_absolute_time_in_fp as it is now obselete 2020-02-25 15:56:53 +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 85ba78b619 More fixes to allow gcc-10 to compile without error 2020-02-13 17:57:30 +00:00
Mike Brady f771774519 Compiles under gcc-10 with -fno-common 2020-02-13 17:37:41 +00:00
Pieter De GendtandPieter De Gendt 32646f22e2 jack: Rename soxr "recipe" to "quality" and configurable buffer size 2019-12-23 09:10:08 +01:00
Pieter De GendtandPieter De Gendt 7285b1ee03 Jack output add soxr resampling 2019-12-03 10:02:22 +01:00
Mike Brady 78c9331c2c Update sample D-Bus commands
Rename D-Bus LoudnessFilterActive property to Loudness and friends
Update sample D-Bus commands
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; fix loudness control.
Fix D-Bus loudness switch silencing output. Rename LoudnessFiulterActive to Loudness. Add Convolution, ConvolutionGain and ConvolutionImpulseResponseFile properties to the D-Bus interface.
Bug fix: correct frame size entry for S24 format
2019-11-13 22:04:22 +00:00
Mike Brady 500b9ad020 3.3.3 from the development branch 3.3.3d11 2019-10-27 09:44:24 +00:00
Mike Brady aa57f06ce3 Move the retain_coverart definition to under a more appropriate compilation flag 2019-10-20 22:11:51 +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 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
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 3323b58d72 Merge branch 'development' 2019-07-26 11:25:28 +01:00
Chris Boot 3a386a6a6b Fix some typos and spelling errors 2019-07-18 16:11:04 -03: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 f13f22d857 Fix stupid auto format error. 2019-05-07 12:22:23 +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 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 aac57c9cdc add standard timing -- more compatible -- and precision timing -- more precise. Add option reader but it's not connected up yet. 2019-04-09 10:23:23 +01:00
Mike Brady 1244bc49ba Add check to see if precision delay is available -- if not, disable the disable_standby feature. 2019-03-27 10:01:20 +00:00
Mike Brady 042d940415 Remove the AUTO bit-depth setting. It's a hack and needs more consideration. 2019-02-28 14:21:05 +00:00
Mike Brady 20967812ad Fix a bug in the activity_monitor software that could lock up a player thread so that it couln't be cancelled. If a player was cancelled while performing an activity script, the activity_monitor_mutex would remain locked. 2019-02-26 15:23:11 +00:00
Mike Brady ca325d0459 Fix an error in non_blocking_write, expose a more general version of it, use it when writing an RTSP response with a three-second timeout. 2019-02-24 13:16:55 +00:00
Mike BradyandGitHub ec84f0fd98 Merge pull request #809 from nettings/development
Modify audio_jack.c to use native jack lockless buffers and to offer auto connect facilities. Overall, the backend is now written more in the idiom of jack audio.

Many thanks to [Jörn Nettingsmeier](https://github.com/nettings).
2019-02-19 11:12:03 +00:00
Mike Brady fce6b5137e Add a new command line option: -u to send logs to STDERR. 2019-02-16 19:32:13 +00:00
Jörn Nettingsmeier bd5cfd3583 forgot to add new option autoconnect_pattern to default conf and common.h 2019-02-16 16:08:40 +00:00
Jörn Nettingsmeier 8c5e85c87c Remove audio_client_disconnect option. This is not good behaviour for a JACK client, and adds nothing. 2019-02-15 23:14:31 +00:00