Commit Graph
480 Commits
Author SHA1 Message Date
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 85cc1bdd97 Fix the dither calculation -- it was 12 dB too high, really noticable on the U8 setting. 2019-06-02 17:56:47 +01:00
Mike Brady d91e41d976 Add missing support for S32_LE, S32_BE, S24_LE and S24_LE formats. 2019-05-29 17:26:44 +01:00
Mike Brady f96a04ae1b quieten the soxr_oneshot timer 2019-05-22 13:25:44 +01:00
Mike Brady b2c6b8f537 fix another harmless (?) possible divide by zero 2019-05-20 09:40:25 +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
Mike Brady 1d32976d07 Improve support for bigendian devices. Add support for S16_LE, S16_BE, S24_LE, S24_BE, S32_LE and S32_BE formats. Make the default S16_LE. Allow precision timing only on alsa devices with names beginning with "hw:". Use snd_pcm_hw_params_is_monotonic() to see if clock is monotonic. 2019-05-01 11:01:15 +01:00
Mike Brady 7ad8907356 quieten a debug message 2019-04-17 16:43:18 +01:00
Mike Brady 9aa8f91c0e Add a new interpolation setting -- "auto" which will choose soxr if supported and the soxr delay is less or equal to the threshold of 30 (milliseconds). 2019-04-16 16:40:56 +01:00
Mike Brady ca8acb4a3f Move the soxr timer checker to run as soon as the system powers up. 2019-04-16 12:59:02 +01:00
Mike Brady d0917fc304 Add code to time soxr_oneshot without playing anything. It's in the wrong place, but it's a start. 2019-04-16 09:10:45 +01:00
Mike Brady 8cdb4dc70e a bit less noisy debug/timing of soxr! 2019-04-15 17:22:52 +01:00
Mike Brady 3a96a5a62d very noisy debug of soxr! 2019-04-15 17:16:30 +01:00
Mike Brady 2dd184165a add soxr interpolation statistics gathering. 2019-04-15 11:52:01 +01: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 5e143fe691 relate initial silence buffer size to the ilent leadin time available 2019-04-02 12:52:36 +01:00
Mike Brady 539dea7d3d Some messages made a bit more useful 2019-04-02 12:28:01 +01:00
Mike Brady c687dadd14 change how the initials size of the silence sent to the dac is calculated, to make it pretty large 2019-04-02 12:24:02 +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 042d940415 Remove the AUTO bit-depth setting. It's a hack and needs more consideration. 2019-02-28 14:21:05 +00:00
Mike Brady 20967812ad Fix a bug in the activity_monitor software that could lock up a player thread so that it couln't be cancelled. If a player was cancelled while performing an activity script, the activity_monitor_mutex would remain locked. 2019-02-26 15:23:11 +00:00
Mike Brady 1fc1247bb0 Quieten an incorrect compiler warning 2019-02-05 12:18:16 +00:00
Mike Brady 3d1ee2e03f Tidy code and slightly reorder settings listing. 2019-02-05 11:38:11 +00:00
Mike Brady 552218ab6e Clean up audio help texts, add in the volume_range_hw_priority setting. 2019-02-05 11:26:54 +00:00
Mike Brady cf03983694 Fix warnings about deprecated mbedtls API calls 2019-02-02 13:05:49 +00:00
Mike Brady 601ac4d760 add a volume control mutex to serialise multiple attempts to change the volume, stop setting the fixed volume to max if using hybrid volume setup 2019-02-01 21:08:41 +00:00
Mike Brady 60487c86b1 Make mute work only if not diconnected. Clewan up some debug messages. 2019-01-31 13:35:11 +00:00
Mike Brady 555bb97a39 Rebuild the hardware mute code -- clear up the logic. Needs to check if disconnected though. 2019-01-31 09:01:35 +00:00
Mike Brady fd08511f1f Make it work with deferred initialisation of the alsa device -- deferred to first use. Investigate hardware mute again. 2019-01-30 17:43:15 +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 7a4949b32f quieten a returned error-code message. 2019-01-24 09:15:09 +00:00
Mike Brady 2e4428538d Add an "active" mode that can time out after a period -- 10 seconds by default -- after play ends. 2019-01-21 21:43:55 +00:00
Mike Brady 2e181f937f add initial script-execution functionality to active mode. Make is possible to wait for start and stop scripts. 2019-01-21 18:20:39 +00:00
Mike Brady a8639f6c40 Add an activity monitor -- can set an activity idle timeout. 2019-01-20 22:15:02 +00:00
Mike Brady 4483037719 Block on command_execute for unfixable errors. 2019-01-15 08:30:00 +00:00
Mike Brady 2ca6e42b62 Do not add dither if at full volume or ignoring volume control 2019-01-10 17:00:10 +00:00
Mike Brady 34d6d89707 Don't use full flush to purge frames after an overrun -- flush will reset the buffers as well. Fix a potential bug if a flush actually occurs. 2019-01-09 10:09:29 +00:00
Mike Brady e9623faa44 Go for a 0.250 second buffer length. 2019-01-08 17:28:38 +00:00
Mike Brady 2e3be271fd Preflight all audio material playing (not lead-in silences though...) 2019-01-08 13:01:22 +00:00
Mike Brady 67a19bf3c9 Make the wait time less than the packet interval time to enable SPS to catch up if it gets behind. 2019-01-07 15:59:58 +00:00
Mike Brady 80f15e1f57 clang format 2019-01-04 17:26:55 +00:00
Mike Brady 7b97ea4019 Add code for calculating and recognising the interpolation threshold. 2019-01-04 17:10:26 +00:00
Mike Brady 4610d0870d Raise the soxr minimum buffer size to something sensible and multiply it by the output ratio 2019-01-04 13:48:56 +00:00
Mike Brady 6f8b35d121 Try out a new alsa delay routine. Could be very buggy! 2019-01-02 14:43:25 +00:00
Mike Brady 919c5fe8b8 Add some diagnostics around the state of the DAC during delays. 2018-12-28 10:35:13 +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 e454572dc7 Further debug tidy-ups and update the configuration file. 2018-12-11 11:26:39 +00:00
Mike Brady 45ce909214 Tidy up some debug messages and warnings, remove old diagnostic codes and settings. 2018-12-11 10:56:36 +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 46a13dce40 Add stall detection to the alsa subsystem. 2018-12-10 10:50:08 +00:00