Commit Graph
389 Commits
Author SHA1 Message Date
Mike Brady 959aa08b8f Clean up the jack backend and add a few options. 2018-08-31 21:41:25 +01:00
Mike Brady 6bad1b3b8c remove some now-redundant code 2018-08-31 12:46:48 +01:00
Mike Brady 8cabb16f25 Initial very rough attempt at a jackaudio backend. 2018-08-31 12:39:18 +01:00
Mike Brady 44c61835b8 Include a few fixes for FreeBSD warnings and quieten some debug messages 2018-08-22 15:10:38 +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 c101d5adf6 Quieten some error messages 2018-08-15 15:58:13 +01:00
Mike Brady 3adcf000a0 Quieten a debug message 2018-08-15 12:41:19 +01:00
Mike Brady 9a005c8ec4 Quieten a debug message 2018-08-15 10:36:29 +01:00
Mike Brady 2a4abea6e5 Modify the timing to be (hopefully) a bit more gentle in its corrections 2018-08-15 10:28:51 +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 51283d2e07 Update some debug messages 2018-08-06 12:33:45 +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 3888125a24 Change calculation order to prevent overflow after about 26 hours at 44,100 fps in the frame rate calculations. Calculate frame rates whether statistcs are requested or not. Clean up some fps rate availability flags. 2018-08-01 09:35:28 +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 6c7b26a633 Add debug message to try to understand a weird negagive memory request. 2018-07-29 15:33:42 +01:00
Mike Brady c91a991edd Prevent arithmetic overflow after 2^32 microseconds, i.e. about one hoour and 11 minutes... 2018-07-29 10:45:55 +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 577449dffa Remove use of SIGUSR1 and pthread_kill to stop threads. Not debugged! 2018-07-27 10:58:36 +01:00
Mike Brady aa13fd9849 Remove hack to try to avoid whitespace removal by rsyslogd. It turns out that this has been fixed in recent versions of rsyslogd. Not on Raspbian Stretch yet though... 2018-07-23 17:37:43 +01:00
Mike Brady f153a1f570 Remove some unwanted debug messages 2018-07-22 16:26:47 +01:00
Mike Brady 2eaaa9cdb3 Fix a bug where the dacp notification handlers are called 2018-07-21 15:35:07 +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 ebacd7f340 Add a little note to self. 2018-07-15 16:48:45 +01:00
Mike Brady 9a8a863825 Clean out player_+thread_please_stop references. 2018-07-15 16:25:56 +01:00
Mike Brady 227f8ce457 Remove player_thread_please_stop stuff and the pthread_kill codes, quieten some debug messages 2018-07-15 14:09:07 +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 8ed8f808b8 Add a cancellation stack to get_buffer_frame. 2018-07-15 13:11:51 +01:00
Mike Brady 525ff37c1c Add a | to the statistics output to ensure the columns of numbers are aligned. Seems to be a bug in the daemon_log (?) 2018-07-15 12:25:38 +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 bae7585cff Make pc add and get items work if pthread_cancel occurs 2018-07-14 14:32:22 +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 65807a8b41 Fix a bug that caused a crash when soxr was enabled and play stopped. Also may have caused other apparently random crashes 2018-07-11 21:00:23 +01:00
Mike Brady 7e0f6acb55 Tidy up some avahi code and some player code, but bug not fixed 2018-07-11 20:49:31 +01:00
Mike Brady 7aee31fb7e Reduce the rate at which resends are requests to make them less, uh, insistent 2018-06-29 22:59:19 +01:00
Mike Brady 1ca0b28e53 Clean up player.c with clang_format. 2018-06-05 19:07:10 +01:00
Mike Brady 370d70651b Add a pthread_cancel cleanup routine to put_packet to unlock that rw thread when cancelled. 2018-06-05 18:58:36 +01:00
Mike Brady 78f4a24caa Quieten the last-ditch message a bit. 2018-06-03 20:05:10 +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 eee822b932 add some more debugging messages. 2018-06-01 16:00:20 +01:00