Commit Graph
554 Commits
Author SHA1 Message Date
Mike Brady 7b8e68650f Fix the rtptime modulo calculations -- the SIGNEX idea doesn't seem to be portable, so it has to be done the hard way. 2021-06-23 14:40:38 +01:00
Mike Brady 767bed6b9f Sometimes the output_rtptime_mask seems to be calculated in 32-bit arithmetic (?), so do it all explicitly in 64-bit signed int as soon as the output_rtptime_sign_bit is calculated. 2021-06-23 11:21:32 +01:00
Mike Brady 0ac00359f7 remove those warnings 2021-06-17 18:16:15 +01:00
Mike Brady c37ee4542d Add code to skip packets of buffered audio that are late or too early. 2021-06-09 19:35:08 +01:00
Mike Brady 5c48580db9 Get it working for multiples of 44100 again. It's stuck accepting only 44,100 fps input for the moment. 2021-06-06 15:51:39 +01:00
Mike Brady 142478933f Move the activity monitor calls to enable active mode correctly for buffered audio. 2021-06-04 09:42:31 +01:00
Mike Brady 516a6b2105 Align some of the statistics better. 2021-06-03 09:52:38 +01:00
Mike Brady bcad9d5998 Add 100 ms to the amount to flush after a large positive sync error to give the system a better chance to recover in one attempt. 2021-06-03 09:21:14 +01:00
Mike Brady 8bee92a4e6 Clean up the statistics output to make it provide information for the stream type. Parameterise it so that it's a bit easier to manage. 2021-06-02 17:17:54 +01:00
Mike Brady c5dafbd28b Remember the original anchor information so that if the master clock become equal to it in the future, it can be restored to those exact numbers and eliminate any intervening approximations. Add some diagnostics. 2021-06-01 14:51:17 +01:00
Mike Brady d4ea91aa65 Rough and hacky but works with the bit depth of the output DAC to automatically choose the correct AAC decoding sample size. Allocation of rotating buffers is fixed and profligate. 2021-06-01 08:56:47 +01:00
Mike Brady 1464c4ed04 Restore ability to compile without AIRPLAY-2 flag (duh). Begin to split player_play into player_prepare and player_play. 2021-05-31 17:12:20 +01:00
Mike Brady a109b587ec Flush seems to be working properly and reliably. Some audio glitches removed too by dropping the first two AAC blocks of any passage. Crude. Flush diagnostic linked list stuff left in place. 2021-05-30 11:17:06 +01:00
Mike Brady 7c68f97d7f flaky but some interesting stuff 2021-05-29 15:59:11 +01:00
Mike Brady 2986b282d3 Does pretty well with flushing. Sometimes misses a flush on a repeat one. 2021-05-28 22:20:11 +01:00
Mike Brady c645a03946 handle volume control requests in AP2 correctly. Don't reset timing peer lists when buffered audio is paused. 2021-05-15 12:18:37 +01:00
Mike Brady 7592e237d8 quieten a debug message 2021-05-13 21:07:56 +01:00
Mike Brady e41795f4da clang 2021-05-13 20:59:38 +01:00
Mike Brady bb226a4184 fix flush of a large sync error, hopefully. 2021-05-13 20:10:38 +01:00
Mike Brady a27f43cf92 Remove some obsolete error checking code. 2021-05-12 10:58:29 +01:00
Mike Brady e8e81a8b07 fix a couple of compilation errors. 2021-05-12 10:57:50 +01:00
Mike Brady 3f77994948 more closely check for time information being available. 2021-05-11 18:52:02 +01:00
Mike Brady 2b88215f09 Clean up some of the sync timing. Ignore a flush if playing AP2. Set the requested lead time to zero. 2021-05-11 10:46:56 +01:00
Mike Brady a563d5e847 Quieten some more debug messages. Fix a misleading clock status return. 2021-05-10 16:03:02 +01:00
Mike Brady 04c7f84564 Improve NQPTP clock diagnostics, tidy up some messages. 2021-05-10 14:16:57 +01:00
Mike Brady 829ea399fc Player thread always gains play lock and keeps ut until terminated. Clean up termination code, add extra diagnistic information and quieten some debug messages. 2021-05-10 09:37:42 +01:00
Mike Brady 953ad8ac14 Move AP2 player termination code from handle_teardown into the player cleanup function so that cancelling the player thread cleans up properly. 2021-05-08 17:46:13 +01:00
Mike Brady fd4cc98aba Slightly better timing. Bumped version for ejurgensen's new pair_ap work. 2021-05-05 18:33:21 +01:00
Mike Brady 25a1303269 Only stop the player if you still have the playing conn. 2021-05-02 15:34:52 +01:00
Mike Brady 6a13062100 clang format 2021-05-02 14:35:31 +01:00
Mike Brady c2940eb23b works in AP1-compatible AP2 mode, but resend isn't working. 2021-05-02 12:49:41 +01:00
Mike Brady a68f28ac2b clang format 2021-05-01 14:09:38 +01:00
Mike Brady bdfb1c6ed6 player.c compiles and everything builds and runs with the airplay 2 flag off. With airplay_2 flag on, rtp.c won't build, but we know that. 2021-04-29 16:51:29 +01:00
Mike Brady 8a73d5972c rtp meged with lots of AP2 stuff still commented out. But it still works. 2021-04-29 15:04:50 +01:00
Mike Brady a8caa0f913 Move latency calculations to rtp.c. Remove checks for infeasible latencies from player.c. 2021-04-28 13:03:27 +01:00
Mike Brady ca56287254 Make the first output backend in the list of backends the default and make its name the default output_name. Clang-format everything 2020-09-03 09:53:13 +01:00
Mike Brady 919e4d6ac1 A gentler flush process for resyncing. 2020-08-13 20:41:30 +01:00
Mike Brady 65391a6916 Potentially fix a flaw in resyncing. A flush is set up but not triggered. 2020-08-13 17:44:35 +01:00
Mike Brady 0dbc37ea94 Quieten a noisy flush debug message 2020-07-08 21:24:44 +01:00
Mike Brady 320baa4db9 quieten some debug messages 2020-06-15 12:16:59 +01:00
Mike Brady 31486a36f3 don't suppress the sending of a pfls token until some frames have been seen. 2020-06-13 14:38:27 +01:00
Mike Brady 4f9f3331e3 Remove the flsr flush request token -- sometimes it's bogus -- add the frame number to the pfls token. Add a little documentation. 2020-06-13 10:41:48 +01:00
Mike Brady 8dfaaf8d8d Add some detail to a debug message. 2020-06-12 19:20:58 +01:00
Mike Brady 34d0a4df8b Fix a debug message 2020-06-12 18:17:44 +01:00
Mike Brady e39f86dc10 remove some unnecessary code for deleting flushed frames 2020-06-12 17:54:02 +01:00
Mike Brady f8c24c5f2b clean up flush detection code 2020-06-12 17:12:50 +01:00
Mike Brady 74894261f5 quieten some debug messages 2020-06-09 09:33:10 +01: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 5decc1bb06 Make the pipe, hub and mqtt separate threads with their own metadata queues. If one blocks, no new metadata is sent to it and the others are unaffected. 2020-05-30 15:49:00 +01:00
Mike Brady 9ae649fa9a change some debugging messages 2020-05-28 15:39:10 +01:00