Commit Graph
64 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
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
Jörn Nettingsmeier e59da78348 Fix segfault due to missing null check... 2019-02-16 21:26:32 +00:00
Jörn Nettingsmeier b361ad84fc NOP. Reformat code consistently, improve comments. 2019-02-16 19:57:28 +00:00
Jörn Nettingsmeier 31bbd743a5 Use appropriate warn/inform/debug levels. 2019-02-16 19:01:37 +00:00
Jörn Nettingsmeier 97370d8bce Actually implement auto-connection, and document it. 2019-02-16 18:45:51 +00:00
Jörn Nettingsmeier 4f39e0d830 Move away from hardcoded channels. Centralizes information, simplifies the code, and might be helpful for future surround support. 2019-02-16 16:09:29 +00:00
Jörn Nettingsmeier 28ea6972af Add dummy option jack_autoconnect_option. 2019-02-16 15:33:29 +00:00
Jörn Nettingsmeier 5c1769f87c Partly revert c00199d664, some 0 are actually longs. It's late :( 2019-02-16 02:28:59 +00:00
Jörn Nettingsmeier 3a4deb38a2 Declare all file-global variables as static, remove unused thread pointer. 2019-02-16 02:26:36 +00:00
Jörn Nettingsmeier 90f24c62df Add myself to (C)omplain-to tag :-D 2019-02-16 02:20:21 +00:00
Jörn Nettingsmeier c00199d664 Always use NULL instead of 0 for pointers for clarity. 2019-02-16 02:15:35 +00:00
Jörn Nettingsmeier 95246dcd84 Use more conservative JACK client name (a simple token without whitespace). 2019-02-16 02:05:05 +00:00
Jörn Nettingsmeier 4751a4e1bc Move jack base latency computation out of delay() into graph() to save cycles. 2019-02-16 02:03:15 +00:00
Jörn Nettingsmeier bda8b99cda Add graph reorder callback, this is where we now compute the output latencies. 2019-02-16 01:53:49 +00:00
Jörn Nettingsmeier f1ba07ff2b Make callback names simpler and more consistent. Always use &callback in setter functions to make the function pointer explicit, even though it's not syntactically necessary. 2019-02-16 01:02:30 +00:00
Jörn Nettingsmeier 0009fcddf6 Revert "Remove client_mutex, since JACK opening and closing is now single-threaded."
That was a bit too optimistic, I guess. Must understand more about the rest of shairport-sync.
Fixes spurious segfault on program termination with CTRL-C that does not happen in gdb :)
This reverts commit 8e46c727d5.
2019-02-16 00:53:04 +00:00
Jörn Nettingsmeier 55797c8387 Remove unused headers. <getopt.h> will come back once we implement command line parsing, the others may well be gone for good. 2019-02-15 23:51:11 +00:00
Jörn Nettingsmeier 8e46c727d5 Remove client_mutex, since JACK opening and closing is now single-threaded. 2019-02-15 23:45:12 +00:00
Jörn Nettingsmeier 2826756938 Remove global client_is_open flag, always execute former conditional statements. We know we're open. 2019-02-15 23:43:00 +00:00
Jörn Nettingsmeier 753cc07777 Remove optional is_running() API call, since it doesn't do anything useful.
We are either already running along just fine, or we are throughly dead.
2019-02-15 23:39:53 +00:00
Jörn Nettingsmeier 1906bfd727 Remove indirections open_if_needed() and close(), can now be integrated into API calls init and deinit. 2019-02-15 23:38:01 +00:00
Jörn Nettingsmeier ec68c677e0 Remove jack_stop() function pointer from API struct, since it does nothing. Checked, no segfault on program termination. 2019-02-15 23:17:50 +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
Jörn Nettingsmeier edd699dfbc Remove auto_client_open_interval option, always open JACK connection immediately or fail.
Remove client creation thread and wrapper function.
2019-02-15 23:08:04 +00:00
Jörn Nettingsmeier 63b3381a27 Fail early and fail deadly (AFAIK there is no fallback to another audio backend, so any severe JACK issue should be fatal). 2019-02-15 22:59:31 +00:00
Jörn Nettingsmeier adefcc698c remove unused globals 2019-02-15 19:34:23 +00:00
Jörn Nettingsmeier 0b589cbe6d Remove option to configure port names. This is very unusual for a JACK client, nothing is gained by offering this, and it might confuse users. 2019-02-15 19:29:24 +00:00
Jörn Nettingsmeier 89a8add7af NOP: move external API functions to the end, ordered by struct audio_output 2019-02-15 18:57:15 +00:00
Jörn Nettingsmeier 91a8553a02 Declare all JACK callbacks static (they are accessed via function pointers only). 2019-02-15 18:43:51 +00:00
Jörn Nettingsmeier 9520e89183 Declare all functions static that are not callbacks and not in audio_jack API struct.
If there are any calls from the outside I haven't thought of, that should make them fail.
2019-02-15 18:39:20 +00:00
Jörn Nettingsmeier d7c7365bb1 comment out some debug statements not relevant to users 2019-02-15 18:31:23 +00:00
Jörn Nettingsmeier a3201ff290 Declare deinterleaving function static, it's nobody else's business. 2019-02-15 18:22:33 +00:00
Jörn Nettingsmeier ec13a2bb3a Do not query the JACK port latency on every process() call. It can only ever change when the graph is reordered. 2019-02-15 18:19:44 +00:00
Jörn Nettingsmeier aefd7cdb33 remove more dead code and obsolete comments 2019-02-15 18:09:36 +00:00
Jörn Nettingsmeier 120e95fc66 Add parentheses around macro to avoid breakage with stronger-binding operators. 2019-02-15 18:06:36 +00:00
Jörn Nettingsmeier 444c114231 NOP: remove commented-out code segments that were re-implemented 2019-02-15 17:58:50 +00:00
Jörn Nettingsmeier 23d4ec2bee Fix logic error in counting the frames written and pending. RESTORES AUDIO! 2019-02-15 17:19:07 +00:00
Jörn Nettingsmeier 6104c580f8 NOP: comment flush implementation 2019-02-15 16:51:17 +00:00
Jörn Nettingsmeier 9c57fe43cc Do not re-check JACK graph latency every time delay() is called. Do not register a latency callback with jack. 2019-02-15 16:41:20 +00:00
Jörn Nettingsmeier 8347223986 Remove dubious latency check from jack_is_running(). For now, we assume JACK is always running, which makes this function pointless, as it always returns possitive. FIXME: understand why it is needed. 2019-02-15 16:08:10 +00:00
Jörn Nettingsmeier aca15a889b remove comment - the "rolling" status of jack transport is irrelevant to shairport-sync. 2019-02-15 15:56:08 +00:00
Jörn Nettingsmeier 7ab566960c move setting of time_of_latest_transfer to play(), we're now looking at ringbuffer writes, not jack output buffers, as those can't be locked to be tested atomically. 2019-02-15 15:53:43 +00:00
Jörn Nettingsmeier a238ac54bb audio_occupancy_now in delay() needs to be in frames, not bytes. Still no luck... 2019-02-14 20:50:02 +00:00
Jörn Nettingsmeier 3e6ef0194f Unset flush_please after flushing. Tentatively re-enable latency queries. Same problems... 2019-02-14 20:39:03 +00:00
Jörn Nettingsmeier 83c8857cf8 try a solution for flush(). Compiled but not tested. 2019-02-14 20:27:49 +00:00
Jörn Nettingsmeier e99837f878 First step of replacing existing buffer with jack_ringbuffer. Compiles, but does not work, of course. 2019-02-14 20:18:05 +00:00