Commit Graph
75 Commits
Author SHA1 Message Date
Mike Brady d67909b837 Add new metadata item: sps:songdatakind, derived from the asdk metadata token. It seems to indicate a timed item (0) or an untimed stream (1). Add output format, output frame rate, stream type (Realtime/Buffered/Classic) properties. Update MQTT appropriately. 2022-11-12 16:42:25 +00:00
Mike Brady 3e4b67e97d Add two new metadata items -- the player's service name, e.g. "Den Speakers" and the name of the current client, if any, e.g. "Joe's iPhone". 2022-11-07 11:33:05 +00:00
Mike Brady 62fca43f49 Fix a bug when displayConfig was exiting when the soxr timer thread hadn't been started. Also quieten a cryptic dbus message. 2022-10-12 14:21:43 +01:00
Mike Brady fd880056fb Squashed commit of the following:
Add three parameters to the backend play() function call -- (1) a flag indicating whether the samples are timed or not. If timed, (2) the timestamp and (3) the local time at which the first frame should be heard.
    Update missing pipewire library message.
    Makefile.am fix.
    Update the SHM version and fix the SHM name so that it works with FreeBSD.
    Remove redundant (?) AC_HEADER_STDC check.
    Fix compilation and installation under FreeBSD -- changes to allow building in a separate directory broke the FreeBSD build process.
    Add AC_CHECK_LIB for gcrypt in case PKG_CHECK_MODULES fails to find it.
    Find gcrypt using pkg-config
    Add code to detect when the RTSP channel goes idle for a period, and use it to reset clocks and timings, etc. so that SPS resumes correctly where the source has gone to sleep while playing a realtime stream and has subsequently woken up.
    Don't exit if a UDP Clock Control packet is empty. Also check minimum packet size.
    Remove some very experimental code which may cause memory and port leaks.
    Strip file path from the filename used in debug messages, information messages, warnings and fatal error messages.
    BB fix to Makefile.am -- overwriting the DBUS stuff with MPRIS definitions, duh.
    Fix some problems building on FreeBSD and tidy up the use of the "sed" editor.
    Fix some problems building on picore.
    Fix an uninitialised variable
    start using the "nqptp" SMI
2022-09-12 15:19:52 +01:00
Mike Brady 05dfcdfd6a Merge other enhancements. 2022-08-09 14:18:53 +01:00
Mike Brady 4963c65a0e Fix the D-Bus quit method so that it works, duh. 2022-08-07 11:15:54 +01:00
Mike Brady b81fb39a80 Add a new D-Bus method called "DropSession" to forcibly terminate the current play session. 2022-08-07 10:02:56 +01:00
Mike Brady 720a271eec Add "Protocol" property -- AirPlay or AirPlay 2. 2022-08-06 19:33:09 +01:00
Mike Brady 8b7e844e38 Add local volume control, not mediated by remote control. 2022-08-06 19:20:26 +01:00
Mike Brady e3faba141c log statsistics headers whenever verbosity goes on or off or whenever statistics are requested 2021-11-28 21:51:26 +00: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 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 789ba1ee5e 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 2020-02-18 14:09:43 +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 ec665d9be4 Change from talking about a server to talking about a client. Technically, e.g. iTunes is a client of Shairport Sync. 2020-01-10 17:21:55 +00:00
Mike Brady 1f75fe4e7a Add or update some of the copyright notices 2019-12-27 14:37:01 +00:00
Mike Brady fe8198a23b 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.
2019-12-20 17:17:21 +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 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 839c778a7c Only send shuffle commands if a change is necessary 2019-09-08 15:53:52 +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 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 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 848467a817 Add "auto" interpolation support to the dbus interface. 2019-04-28 21:39:42 +01:00
Mike Brady f74e2c2c96 Revert some experimental changes made to explore problems with Cygwin D-Bus access. 2019-02-27 12:53:09 +00:00
Mike Brady d3d86d6192 Try to get a private connection to the system D-Bus 2019-02-20 18:43:10 +00:00
Mike Brady 405a028f33 quieten some exiting debug messages 2019-02-16 19:44:25 +00:00
Mike Brady 5af6179875 use the term'state' rather than 'mode' when taling about the active state. Use 'while_active' rather than 'while active' 2019-02-12 15:47:10 +00:00
Mike Brady 97a4766e93 Add call to check if the dbus service is started. 2019-02-08 22:31:50 +00:00
Mike Brady 34351a99cb Continue hooking up active mode and disable standby stuff 2019-02-08 16:57:39 +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 a74261bbd3 Add a D-Bus property "DisableStandby" to turn standby oo or off. 2019-01-11 14:48:00 +00:00
Mike Brady c9b3d2a2f4 Many changes to compilation and linking flags. Stop using HAVE_* flags except where necessary, use CONFIG_* for optional stuff, use HAS_* for immediate definitions, use USE_* for AM definitions. Probably introduced bgs, sigh. 2018-09-09 20:41:31 +01:00
Mike Brady 69642bb7de Partly clean up use of automake, autoconfig and compiler flags. Works but still not consistent. 2018-09-09 14:12:20 +01:00
Mike Brady 5141e2f5dc Format tidy-up 2018-08-14 12:14:49 +01:00
Mike Brady df18e3a017 Add the ability to read and change the stuffing threshold 2018-08-13 14:05:14 +01:00
Mike Brady 4590b08e62 Fix a bug whereby libsoxr-required code wasn't included, causing soxr interpolation to be disabled. 2018-08-08 09:04:58 +01:00
Mike Brady c85e7e05d1 Add a frames per second output. This should be exact if the machine is connected up to, say, an NTP time service. It uses CLOCK_MONOTONIC time. 2018-07-28 19:02:02 +01:00
Mike Brady f1d4503431 Try to add proper cancellation code to all threads -- not complete, buggy. 2018-07-20 13:50:38 +01:00
Mike Brady c8c70b6016 Add quit commands to the MPRIS and native D-Bus command set. Not tested ecologically. 2018-07-18 15:32:07 +01:00
Mike Brady a4eaace76b Begin to try to get Shairport Sync to quit cleanly, relinquishing memory and ports etc. properly so that valgrind can be more useful. 2018-07-17 10:28:06 +01:00
Mike Brady c2e3fa5aa7 Move ab_mutex, flow control CV and flush mutex initialisation and teardown out of the player thread. Thus remove need for player theread lock. Format some of the surce files. 2018-07-14 13:38:29 +01:00
Mike Brady 7d446832bf Quieten some debug messages 2018-06-21 18:04:24 +01:00
Mike Brady 365843faa6 beginning to add a progress string item to the native dbus interface 2018-06-21 17:44:26 +01:00
Mike Brady 08a7d4ffb5 Use snprintf in place of sprintf. 2018-04-08 15:36:05 +01:00
Mike Brady 8bf83c149f Modify latency detection to use the second word of a sync packet to decide whether to add an extra delay or not. Use all sync packets, not just one with the exception flag. Use 1024 buffers -- a bit profligate, but hey. 2018-04-02 16:42:46 +01:00
Mike Brady cb69c1dd2e Take in track metadata but discard it if it's invalid (i.e. has a given mper ID of 0. 2018-04-01 16:09:53 +01:00
Mike Brady 07b7e64a48 Fix some of the advanced remote code 2018-04-01 13:54:41 +01:00