Commit Graph
181 Commits
Author SHA1 Message Date
Mike Brady d93aeec50a Quieten a few debug messages. 2018-11-23 15:11:04 +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 3709ac8180 experimental 2018-11-23 08:53:27 +00:00
Mike Brady 303a85c3b5 Add back in the ability to interrupt a session. Clean up a few debug messages. 2018-11-21 21:32:18 +00:00
Mike Brady ccc4fe09af Tidy up the formats. 2018-11-20 22:56:53 +00:00
Mike Brady 29a37f44b9 Check timer values a bit more carefully and ignore crazy values. 2018-11-14 12:25:56 +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 a5f165d982 Use a parameter rather than a hard-wired input rate. 2018-10-21 16:31:55 +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 31499dcea8 Allow for a change in the sync time of AirPlay on Mojave and iOS 12. 2018-10-11 15:35:17 +01:00
Mike Brady d2f6a446e1 Bring up to date with 3.3d2 from the raspberry pi 2018-08-22 14:41:03 +01:00
Mike Brady 754155ce0f clang format 2018-08-22 13:07:04 +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 d5197081ef Fix a stupid divide-by-zero error and remove unrecognised warning options for FreeBSD 2018-08-20 19:53:16 +01:00
Mike Brady ac336974b6 Quieten a debug message 2018-08-15 15:56:14 +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 95bb10a6c3 Remove or comment out some extraneous code, quieten some debug messages. 2018-08-08 09:03:53 +01:00
Mike Brady 78f1cd614c Allow for different output rates in the new calculations 2018-08-06 09:48:36 +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 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 f1d4503431 Try to add proper cancellation code to all threads -- not complete, buggy. 2018-07-20 13:50:38 +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 6eab2d1617 Use shutdown() before close() and separate out the cancel requests for the timing, control and audio threads, see if we can see anything. 2018-06-03 19:59:24 +01:00
Mike Brady 497d49dda6 Move the resend requests to outside the ab_mutex lock and put a send timeout on the resend requester. 2018-06-01 14:23:34 +01:00
Mike Brady 93f410599f Add debug_mutex_unlock code in place of a regular pthread_mutex_unlock in some places. 2018-06-01 09:28:28 +01:00
Mike Brady 18b37ea254 Replace all pthread_mutex_locks with debug_mutex_lock with a message and timer. Not really tested. 2018-06-01 08:29:48 +01:00
Mike Brady 510424dc5f quieten a few compiler warnings 2018-05-20 15:12:33 +01:00
Mike Brady 499fae9796 Tidy up and quieten some debug messages. 2018-05-18 10:08:01 +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 d0237fb420 Change some debug messages. 2018-05-17 11:29:59 +01:00
Mike Brady 8a5a29e2c2 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. Tidy up the code a bit and remove a clobbering warning. 2018-05-17 10:29:59 +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 7e7bbaf4da Change the resend error backoff to one sixteenth of a second -- now can alomst tolerate a 10% failure of packets. 2018-05-09 20:20:54 +01:00
Mike Brady 8c6e4b8ea4 Make the UDP sockets blocking rather than non-blocking, but set 2 millisecond limits on the sendto calls. 2018-05-09 09:29:47 +01:00
Mike Brady 6d66b2ed33 Stop erroneously assuming that the buffer passed to the player is not changed -- sometimes it is, it seems. Tidy up some typing. 2018-05-07 22:00:01 +01:00
Mike Brady b0db1b228c Its 353 not 363. 2018-05-04 20:21:47 +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 41241681e3 Make resend error backoff work better and set it to 0.5 seconds. Quieten some routine debug messages. 2018-04-23 13:09:44 +01:00
Mike Brady 3e72bb216e Send resend requests via control channel rather than the audio channel. This makes it compatilbe iwht AirAudio and confformant with the unofficial guide to the airplay protocol. Brown bag time. 2018-04-19 10:16:28 +01:00
Mike Brady 0738ddeac8 Make resend requests come from tyhe control socket rather than the audio socket. This makes it work with AirAudio and according to the unofficial standard. 2018-04-18 20:29:16 +01:00
Mike Brady ad48056686 Improvements in handling non-existent DACP server, slightly more informative debug messages. 3.2RC4. 2018-04-18 10:34:50 +01:00
Mike Brady ae94daf259 Add a little more detail to the resend requests 2018-04-17 21:08:29 +01:00
Mike Brady e002da6033 Fix a tiny typo. 2018-04-16 10:05:02 +01:00
Mike Brady ed0ce06e82 Fix a few tiny typos and rationalise some debug message levels. 2018-04-16 10:00:22 +01:00
Mike Brady 70c72821c9 Add code to skip occasional outgoing and icoming timing and resnd packets to simulate a bad network. Quieten some debug messages. 2018-04-14 17:33:45 +01:00