Commit Graph
162 Commits
Author SHA1 Message Date
Mike Brady bdc2dca3ec 3.3.7rc0 2020-07-06 17:09:15 +01:00
Mike Brady 02224666da Squashed commit of the following:
Don't use strndup as old versions of OpenWrt don't seem to have it
    Update FREEBSD.md
    Fix comparison between old and new metadata strings by checking they have equal lengths as well.
    Remove a redundant definition to prevent use on an uninitialised copy, clean up some of the less-used backends
    Remove some unwanted and unused variable declarations from audio_dummy.c and audio_soundio.c
    Add the -fno-common flag to compilation.
    Treat the "mper" attribute as the 64-bit item that it is rather than a 32-bit item as hithereto. Output it as a hexadecimal number to correspond with the format of the track id obtained from AppleScript
    Make changes to that it compiles under gcc-10 with -fno-common
    Add a SIGCHLD handler to reap zombie processes generated after script invocations where wait_for_completion is set to "no".
    Update and rename CONTRIBUTING.md to REPORTING ISSUES.md
    Add a few more commands and clarify some text.
    Change from talking about a server to talking about a client. Technically, e.g. iTunes is a client of Shairport Sync.
    Store the UserAgent so as to recognise forked-daapd so as to always send a revision_number of 1 when asking for playerstatus of forked-daapd.
    Add or update some of the copyright notices
    Add the ability to set the volume directly to the D-Bus RemoteControl interface and to the MPRIS interface. Both use the recently-discovered ability to set the device_volume.
    Merge in Pieter De Gendt's work on resampling on the jack backend.
    Merge pull request #939 from pdgendt/feature/jack-soxr-resampling
    Add SetAirplayVolume to the D-Bus RemoteControl interface.
    Add SetVolume to the MPRIS interface.
    Hook up the Volume property in the MPRIS interface.
    Modify RemoteCommand in the D-Bus interface to return the HTTP status and response.
    Change the type of airplay_volume from int to double in the metadata hub.
    Add a few sample commands in the D-Bus document.
2020-02-20 21:32:35 +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
Mike Brady db8fc8057f Always include the up-to-date abbreviated git hash if we are in the git repository. 2019-04-16 22:45:45 +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 57bcea52c7 Tidy up the exit() arguments. 2019-04-10 21:32:08 +01:00
Mike Brady 84eecaf722 use abort() to exit after a "die" call and fix the logic of opening the alsa device -- success was causing it to die, duh. 2019-04-09 22:26:26 +01:00
Mike Brady 178af21dab Make soxr, metadata and apple_alac defaults if support for them is included in the build configuration. 2019-03-08 21:19:48 +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 Brady fce6b5137e Add a new command line option: -u to send logs to STDERR. 2019-02-16 19:32:13 +00:00
Mike Brady 54bb627eff Fix some errors and warnings from OpenBSD 2019-02-12 10:55:04 +00:00
Mike Brady e76cfa69fe remove dependency on libdaemon -- leave it in by default, but allow the new configuration option --with-libdaemon. 2019-02-05 15:12:51 +00:00
Mike Brady 94f68798c8 Merge branch 'unstable' of https://github.com/mikebrady/shairport-sync into unstable
Merging two unstable branchses that have diverged
2019-01-27 13:57:46 +00:00
Mike Brady 4188eba571 Fix a cause of a memory leak using OpenSSL for Base 64 encoding. 2019-01-27 13:48:06 +00:00
Mike Brady 0a9063fafe move malloc_cleanup to common.c 2019-01-23 16:34:34 +00:00
Mike Brady 2e4428538d Add an "active" mode that can time out after a period -- 10 seconds by default -- after play ends. 2019-01-21 21:43:55 +00:00
Mike Brady 604ca8dee4 Hook up active mode stuff to metadata, add two four-char codes, improve external command calling. 2019-01-21 21:18:40 +00:00
Mike Brady 99fd6b85d0 make OpenSSL routines un-cancellable, in case there is a possible memory leak 2019-01-18 16:31:36 +00:00
Mike Brady 4483037719 Block on command_execute for unfixable errors. 2019-01-15 08:30:00 +00:00
Mike Brady b9d78c8af6 Avoid wrapping back to the first three UDP ports when assigning ports using nextFreeUDPPort because the call resetFreeUDPPorts, called when not interrupting an existing session, will assign the first three ports without checking (or knowing) if they were recently in use. 2019-01-11 10:42:17 +00:00
Mike Brady 8f20e5808b clang format 2019-01-10 16:12:57 +00:00
Mike Brady 9f8b8a25c9 add actual waiting time for a failing timed mutex. 2019-01-10 16:09:52 +00:00
Mike Brady 4046c0e73d Fix dither, add dither to silences during lead-in, interpolatied frames and keeping out of standby, only if the output device doesn't use a mixer. Check configuration at initialisation. 2018-12-14 15:07:00 +00:00
Mike Brady 9d5ff22f2d Connect up the stall response to the external command calling -- add a single argument to the unfixable error call. 2018-12-10 22:28:52 +00:00
Mike Brady 12611b5521 Fix small error in uncancellable sleep -- it was calling itself! 2018-12-08 17:48:47 +00:00
Mike Brady 277d401d24 Ensure watchdog always starts with the starting time of the thread. Add watchdog bark count. On the third bark, execute an unfixable error script if present. 2018-12-04 17:25:15 +00:00
Mike Brady 8c9b159011 Stop using an unsigned integer for time when we want to watch if it goes negative. Only release the playing_conn if we already own it! 2018-12-02 18:13:20 +00:00
Mike Brady bcf9b1a843 Quieten a debug message 2018-11-29 13:12:53 +00:00
Mike Brady ca45d2ecbe Clang formatted. 2018-11-29 12:18:07 +00:00
Mike Brady c318796e55 Add an uncancellable usleep timer. Make the player and UDP thread cleanups uncancellable. 2018-11-29 11:37:56 +00:00
Mike Brady 22f3e3e318 Move watchdog to cover connection from start, not just from start of play. Start investigating UDP port allocation. Tidy up handling or RTSP write errors -- remove the pselect code from before a write. 2018-11-28 17:18:03 +00:00
Mike Brady 998e7cea2c clang-format 2018-11-24 11:16:57 +00:00
Mike Brady dcd8fbc1ec Remove some unnecessary test code from the debug messaging. 2018-11-23 16:10:18 +00:00
Mike Brady 4c5790de28 Fix off-by-one error in UDP range counting 2018-11-23 13:39:23 +00:00
Mike Brady 093bf1dd46 Rotate usage of UDP ports if a session is interrupted. Avoids out-of-date packets landing in a new session. 2018-11-23 13:29:09 +00:00
Mike Brady ccc4fe09af Tidy up the formats. 2018-11-20 22:56:53 +00:00
Mike Brady ec7d46bc32 Double check debug is not a cancellation point and move the dacp monitor initialisation code to after the subsidiary session threads are created. 2018-11-20 12:06:13 +00:00
Mike Brady 8991a08278 Make debug_mutex lock and unlock completely quiet if the debug level is chosen to be 0. 2018-11-19 20:51:49 +00:00