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
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
Mike Brady
40289ca6d3
functional with full removal of get_absolute_time_fp() but not quite starting correctly
2020-02-24 22:23:08 +00:00
Mike Brady
f771774519
Compiles under gcc-10 with -fno-common
2020-02-13 17:37:41 +00:00
Mike Brady
27e42a666a
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.
2020-01-10 17:20:25 +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
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
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
1f45b8c006
allow calculation of nominal source frame rates even when the connection is error prone.
2019-04-02 15:37:38 +01:00
Mike Brady
5a7b7c011b
Add the ability to receive uncompressed 16 bit big-endian (?) / 44,100 fps / interleaved stereo PCM.
2019-03-18 11:21:27 +00:00
Mike Brady
46d117b69a
add a volume control mutex to serialise multiple attempts to change the volume
2019-02-01 21:07:35 +00:00
Mike Brady
c5ff0dfed0
Rebuild the volume control calculations. Implement software mute. Try to delay alsa initialisation as long as possible.
2019-01-30 09:24:10 +00:00
Mike Brady
3434761517
Add code for calculating and recognising the interpolation threshold.
2019-01-04 17:10:57 +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
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
78da7c453c
Make the stop requester volatile, duh.
2018-12-03 18:01:54 +00:00
Mike Brady
4bb29bc198
Make sure that shared watchdog count is correctly updated in the rtsp_conn_info structure!
2018-12-03 16:52:32 +00:00
Mike Brady
76ee6d5e43
Add new watchdog thread for the player -- should be more reliable than the existing code.
2018-11-26 19:33:22 +00:00
Mike Brady
3cb359c747
Tighten up integer promotion checks to calculate large delays properly. Fix input rate calculation restarting.
2018-10-23 10:26:08 +00:00
Mike Brady
e0a4e5cde8
Format tidy-up
2018-10-21 17:10:23 +01:00
Mike Brady
e5259e8764
Remove a few compiler warnings.
2018-10-21 17:00:56 +01:00
Mike Brady
d2dba7cdba
Seems to work for higher rates
2018-10-19 22:14:23 +01:00
Mike Brady
de071aeffc
Try to fix modulo calculations
2018-10-18 17:44:50 +01: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
1ee806a53a
Fix display of drift -- the sign is correct now. All timing is relative to the local clock. Add a rough estimate of the correction necessary. Use the most recent 128 timing samples.
2018-08-22 13:02:42 +01:00
Mike Brady
5141e2f5dc
Format tidy-up
2018-08-14 12:14:49 +01:00
Mike Brady
519135734f
Calculate actual and nominal input frame rates more accurately, allowing for flush and resume events.
2018-08-14 12:13:02 +01:00
Mike Brady
2f58856268
Add source rate calculation based on source frame and timing information, calculated from start of play session.
2018-08-13 14:44:22 +01:00
Mike Brady
a8cfc9915f
display the number of samples used to calculcate drift, clean up the settings for the number of samples to skip at the start and for the minimum number of samples to use. Store 64 samples.
2018-08-13 14:06:40 +01:00
Mike Brady
3870195cf9
Begin to use a unified and more accurate scheme for translating between local time and rtp timestamp, taking clock drift and actualt source rate into account if available. Not dealing with highes output rates yet.
2018-08-05 17:23:07 +01:00
Mike Brady
f6b3c420c7
Enable input frame rate calculation to handle a pause/resume correctly.
2018-07-30 14:07:39 +01:00
Mike Brady
b75c82d14a
Add input frame rate calculation.
2018-07-30 13:39:38 +01:00
Mike Brady
76c5dd9285
Stop using SIGUSR1 for cancelling threads, use pthread_cancel and friends instead, fix some memory leaks, add accurate ouput rate calculation to statistics, add "quit" verb to MPRIS and native d-bus interfaces. Probably still buggy.
2018-07-30 10:07:11 +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
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
9a8a863825
Clean out player_+thread_please_stop references.
2018-07-15 16:25:56 +01:00
Mike Brady
01f2a374b9
Use pthread_cancel to stop a player thread rather than SIGUSR1 and pthread_kill.
2018-07-15 13:54:33 +01:00
Mike Brady
768dc7759a
Tidy up log output and add timers to inform statements. Move more stuff to the player thread pop function. Warn about cancellation points in debug versions of mutex lock and unlock. Ensure they are not cancellation points when debug not in use. Warn about Mac OS X cancellation points.
2018-07-15 11:54:48 +01:00
Mike Brady
d3b79b965d
Make more of the code amenable to pthread cancel
2018-07-14 19:34:31 +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
d224f47e37
Remove unneeded volume control mutex, adjust some timings, add wait time to slow mutex locks.
2018-06-01 11:21:16 +01:00
Mike Brady
6d08725539
If the player thread is locked, don't block player_put_packet. Instead, discard the packet.
2018-05-17 16:15:17 +01:00
Mike Brady
7d0eb37958
Move to using pthread_cancel in place of pthread_kill -- due to a problem in CYGWIN, but the move makes the code simpler and more rugged.
2018-05-17 10:16:44 +01:00
Mike Brady
b9d3a036b1
Revise resend interval calculation to spread it out over a long latency.
2018-05-15 12:08:01 +01:00
Mike Brady
418b1ba7c7
Add a read-write mutex to protect a player thread when it's being created or deleted; make player_flush get a read lock to get access.
2018-05-12 15:10:27 +01:00
Mike Brady
21e1e12c76
If it's an AirPlay user agent up to and including version 363 (iOS 11.1.2) use the old offset calculation by adding 11,205 frames to the offset.
2018-05-04 18:25:52 +01:00
Mike Brady
3823f337d0
incorporate 3.2d30 stuff -- lots of important bug fixes -- and include the extra diagnostic information from RC2
2018-04-14 14:06:09 +01:00
Mike Brady
49d5486df6
Keep timestamp info from the incoming audio packet
2018-04-14 13:56:44 +01:00