Commit Graph
40 Commits
Author SHA1 Message Date
Mike Brady 3aa34cd712 fix lots of errors calling debug() with incorrect argument patterns. 2025-12-30 14:59:27 +00:00
Mike Brady 07b60e7112 1. Add the ability to work back through queued buffers to find the first buffer that’s older than the given one. This is to enable the replacement of deciphered buffers with buffers that arrive later but are timed earlier.
Added functions that relate to this are: get_revised_seqno() to wind back through the queued buffers and clear_buffers_from() to free buffers that are already occupied.
2. Clean up get_audio_buffer_size_and_occupancy() and replace it with get_audio_buffer_occupancy().
3. Add a new general setting: audio_decoded_buffer_desired_length_in_seconds for managing the size of the player buffer queue when the source is buffered audio. Default is 0.75 seconds so that we can step back up to that time if older buffers appear.
2025-12-14 10:17:38 +00:00
Mike Brady e12a3ed7b2 Do a long-overdue rebuild of the buffered audio processor and, with everything we have figured out, implement a cleaner method to handle both immediate and deferred flush requests. Remove lots of old flags and redundant code. Leave in a few debug messages. 2025-11-16 16:58:34 +00:00
Mike Brady a5a54621d8 Improve the warning about invalid setting strings. 2025-07-17 12:23:53 +01:00
Mike Brady 60143518c2 This squashed commit comprises a long series of improvements, bug fixes, optimizations, and new feature additions:
- 48,000 frames per second operation,
 - 48k lossless stereo, 5.1 and 7.1 surround sound
 - Multichannel and multi rate operation on ALSA, PipeWire, PulseAudio, FreeBSD, stdout and unix pipe output backends.

Automatic, flexible and controllable output format (rate, sample format and channel count) selection.

Full FFmpeg integration to support transcoding, resampling, and new audio formats.

Better operation on lower powered devices down to e.g. Raspberry Pi B.

Reduced Docker image sizes with a slimmed-down FFmpeg library.

Enhanced timestamp handling for better synchronization.

Improved the sync error calculation.

A new "vernier" resampling and interpolation method for low-power CPUs.

Bug fixes and minor enhancements.

Note -- there are many breaking changes from previous versions of Shairport Sync!
2025-02-23 13:31:17 +00:00
Lukas Rusak ec23236370 pipewire: add initial support 2021-04-01 10:12:42 -07: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 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 a4edc649f8 Add code to do calculations involving the audio_backend_latency_offset_in_seconds and audio_backend_silent_lead_in_time settings correctly. Clean up the audio_backend_silent_lead_in_time setting by adding an "auto" setting. 2020-05-16 12:23:08 +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 1f75fe4e7a Add or update some of the copyright notices 2019-12-27 14:37:01 +00: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 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 552218ab6e Clean up audio help texts, add in the volume_range_hw_priority setting. 2019-02-05 11:26:54 +00:00
Mike Brady 1ae7856dd2 Stop a segmentation error if a bsackend has no help routine 2019-02-05 10:23:24 +00:00
Mike Brady 80f15e1f57 clang format 2019-01-04 17:26:55 +00:00
Mike Brady db0e718c12 Add code for getting and setting the interpolation threshold. 2019-01-04 17:07:21 +00:00
Mike Brady 72fa29b645 Allow a latency offset of +/- 1.75 seconds. 2018-10-14 15:15:45 +01:00
Mike Brady 8cabb16f25 Initial very rough attempt at a jackaudio backend. 2018-08-31 12:39:18 +01:00
Mike Brady d3b79b965d Make more of the code amenable to pthread cancel 2018-07-14 19:34:31 +01:00
Mike Brady 1e0d0944c0 Tidy up configure.ac and drop old pulseaudio back end 2017-10-09 09:38:35 +01:00
Mike Brady e513e5330c Tidy up source using clang-format 2017-07-31 11:57:57 +02:00
Mike Brady ede276d4af Allow a zero silent lead-in time. 2017-07-22 17:37:02 +02:00
Mike Brady b7864b4ecf Move common audio backend settings like buffer size and offsets to the "general" settings stanza. Improve the resync code a little. 2017-07-21 12:29:03 +02:00
Mike Brady b3ae05ea60 Initial very rough full-fat pulseaudio backend 2017-05-17 08:49:40 +01:00
shtirlic 71fc1a2c70 Initial support for libsoundio 2016-12-04 00:03:23 +02:00
Mike Brady 064bd293c5 Tidy up with a clang-format 2016-09-11 10:35:53 +01:00
Mike Brady 55f57c1fb4 Make dummy, pipe and stdout back ends truly optinal 2015-08-01 14:32:03 +02:00
Mike Brady 38281dd1c5 Add new auidio back end -- to stdout. 2015-06-02 11:59:56 +00:00
Mke Brady 87a0475c16 Reformat using clang-format. 2015-06-01 23:16:50 +01:00
James Laird 82518dc334 whitespace cleanups 2013-10-22 10:44:40 +11:00
Dimitri Sokolyuk 629e202f1b add support for openbsd sndio sound daemon 2013-09-05 03:24:23 +02:00
MuffinmanandJames Laird 95035f3389 Alsa output driver
Based on a bit of code of @Skaman and bit of mine, I've added support
for mixer and audio Alsa support.
2013-06-20 18:30:42 +10:00
James Laird cb14d56a5b Merge pull request #223 from plietar/pulseaudio
Add a PulseAudio output driver, courtesy of Paul Lietar
2013-06-19 08:37:09 -07:00
James Laird a38a03ed7d audio: update usage messages 2013-06-20 01:06:08 +10:00
Paul Lietar a69c5f20f5 Add a PulseAudio output driver.
It uses libpulse's synchronous API, to output to PulseAudio
without using libao.
2013-06-10 15:44:27 +02:00
James Laird 0129db088f add a pipe/FIFO audio backend 2013-06-04 00:30:17 +10:00
James Laird 98da1d2f66 whitespace fixes 2013-05-14 09:14:27 +10:00
James Laird cf8401dbc8 Add copyright notices. 2013-04-01 21:57:11 +11:00
James Laird 9b33878c59 audio: output selection functionality 2013-04-01 21:43:24 +11:00