Mike Brady
16b6534ad3
further changes to remove compilation warnings on 32-bit builds
2025-12-31 19:02:16 +00:00
Mike Brady
3aa34cd712
fix lots of errors calling debug() with incorrect argument patterns.
2025-12-30 14:59:27 +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
e05448aecc
Check for configuration strings that are given but turn out to be empty, issue a warning and ignore them.
2025-04-14 10:40:26 +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
Mike Brady
5f64722a70
Merge branch 'development' of github.com:mikebrady/shairport-sync into development
...
forgot online update
2024-06-03 09:37:11 +01:00
Mike Brady
eaf923614a
Give access to mixers in a HDMI device by attaching the mixer to the device's name but replacing the header hdmi: with hw:
2024-06-03 09:36:37 +01:00
Mike Brady
238e4bbfa3
Modify the alsa help to use the hdmi: prefix for the HDMI devices it finds.
2024-06-01 22:08:41 +01:00
Mike Brady
c0f5112b8d
Remove some almost-never-used and therefore untested code, and remove a potentially misleading comment from the ALSA backend.
2024-04-24 10:31:10 +01:00
Mike Brady
b7d9c22de9
format adjustments
2023-09-11 16:01:38 +01:00
Mike Brady
b5bb2fef38
Capture where the device was never there (ENOENT), as opposed to when it was there but disappeared (ENODEV).
2022-12-31 17:57:25 +00:00
Mike Brady
76387f8291
Be more careful checking for ENODEV conditions in audio_alsa.c. Still a few places where it is not done...
2022-12-31 17:16:02 +00:00
Mike Brady
ae5910e2e7
make the error message one single identifier by linking the error number to the message with an underscore.
2022-12-30 19:31:01 +00:00
Mike Brady
d6536a8e79
Call the unfixable error if the output device can't be opened or disappears. Clang-format.
2022-12-30 18:36:33 +00:00
=
0b03f23795
Fix a bug in audio_alsa.c when there is no hardware device name.
2022-11-19 09:05:26 +00:00
Mike Brady
2bc62c7dd9
Close the DAC when the keep_dac_busy flag is changed (by the activity monitor) from true to false. Wait a little longer for the DAC to drop all frames.
2022-09-30 10:18:51 +01:00
Mike Brady
fd880056fb
Squashed commit of the following:
...
Add three parameters to the backend play() function call -- (1) a flag indicating whether the samples are timed or not. If timed, (2) the timestamp and (3) the local time at which the first frame should be heard.
Update missing pipewire library message.
Makefile.am fix.
Update the SHM version and fix the SHM name so that it works with FreeBSD.
Remove redundant (?) AC_HEADER_STDC check.
Fix compilation and installation under FreeBSD -- changes to allow building in a separate directory broke the FreeBSD build process.
Add AC_CHECK_LIB for gcrypt in case PKG_CHECK_MODULES fails to find it.
Find gcrypt using pkg-config
Add code to detect when the RTSP channel goes idle for a period, and use it to reset clocks and timings, etc. so that SPS resumes correctly where the source has gone to sleep while playing a realtime stream and has subsequently woken up.
Don't exit if a UDP Clock Control packet is empty. Also check minimum packet size.
Remove some very experimental code which may cause memory and port leaks.
Strip file path from the filename used in debug messages, information messages, warnings and fatal error messages.
BB fix to Makefile.am -- overwriting the DBUS stuff with MPRIS definitions, duh.
Fix some problems building on FreeBSD and tidy up the use of the "sed" editor.
Fix some problems building on picore.
Fix an uninitialised variable
start using the "nqptp" SMI
2022-09-12 15:19:52 +01:00
Mike Brady
30510e72f1
Remove a very noisy and redundant debug message.
2022-08-16 09:25:53 +01:00
Mike Brady
449e024c95
If the default device is inaccessible with EHOSTDOWN, try hw:0 instead. Works for Fedora 36 Workstation. Might need to make it a bit smarter.
2022-07-22 15:52:16 +01:00
Mike Brady
129343c165
Don't quit if the ALSA output device is or becomes busy and resume when it becomes available again.
2022-07-20 18:04:42 +01:00
Mike Brady
850fda1055
Fix a typo.
2022-05-19 18:07:32 +01:00
Mike Brady
00bc837bef
quieten some debug messages.
2022-05-17 17:50:46 +01:00
Mike Brady
3b4a21f002
Quieten some debug messages. Remove some redundant code.
2022-05-17 15:49:01 +01:00
Mike Brady
a295c2a291
Improve the logic for supressing clicks when the alsa disable_standby_mode is active.
2022-04-03 10:35:48 +01:00
Mike Brady
8490c4c1c1
Always record frames successfully sent to DAC even if they are less than requested.
2022-03-16 10:19:15 +11:00
Mike Brady
a382ac6672
Clang Format
2022-03-14 11:56:43 +11:00
Mike Brady
3d96f79ddc
Quieten a few debug messages.
2022-03-11 17:03:49 +11:00
Mike Brady
0b4b4a73fc
make close() a separate function and make flush do a close if we don't have to keep the dac active.
2022-03-10 17:41:53 +11:00
Mike Brady
713492a709
Check to see if the alsa_handle is NULL in standard_delay_and_status. Don't see how it could happen though.
2022-03-07 16:23:59 +11:00
Mike Brady
8476e5efac
Check to see if the alsa_handle is NULL in precision_delay_and_status. Don't see how it could happen though.
2022-03-07 13:32:16 +11:00
Mike Brady
9bac04e2d7
Check for NULL pointers before deferencing delay and state variable pointers in audio_alsa.c's delay and delay_and_status functions.
2022-03-04 10:02:40 +11:00
Mike Brady
70ef99e924
Add a special-purpose flush routine called sub_flush. It doesn't close the device ever.
2022-02-26 08:33:19 +00:00
Mike Brady
6ced6bc67d
Add a "mixer_control_index" setting to the "alsa" part of ther configuration file. A mixer is fully identified by a name and index, duh. Change some debug messages and add an entry to the sample configuration file.
2022-01-21 18:18:13 +01:00
Mike Brady
56bef8e7dd
Use CLOCK_MONOLITHIC_RAW to avoid NTP effects, report raw and corrected timing from audio_alsa. Clean up statistics. Stop watchdog timing out AP2 sessions. CLean up some debug messages.
2021-11-28 16:08:48 +00:00
Mike Brady
dc5b8f1a11
Clang format
2021-11-26 18:02:23 +00:00
Mike Brady
136071a621
change stats to report non-zero if output has just opened or if there has been any discontinuity in play from previous time.
2021-11-26 15:17:27 +00:00
Mike Brady
14bfba2724
Add code to check divisions and mods for a potrntial divide by zero problem. MAy cause SPS to terminate but leave a log message.
2021-11-21 21:47:32 +00:00
Mike Brady
cd9da86fc3
Add a 'stats' function to the audio back ends to replace the 'rate_info' function. Zero all except the alsa back end.
2021-11-20 13:59:16 +00:00
Mike Brady
5f8e6e3989
attempt to increase the precision of the FPS timing
2021-11-20 12:14:23 +00:00
Mike Brady
c0a3dacf30
Working to check for divide / mod by 0's
2021-11-17 10:35:21 +00:00
Mike Brady
99c6638573
Ensure the frame rate calculator allows for silent frames added to disable standby. Clean up outmoded and unused stuff in audio_alsa.c. More to do.
2021-11-06 18:32:26 +00:00
Mike Brady
366eb27afc
Stop a message from repeating endlessly.
2021-09-09 11:23:25 +01:00
Mike Brady
f058d118c1
Quieten a really noise message on verbosity 3.
2021-09-03 15:38:28 +01:00
Mike Brady
6f9c17690f
Bring over some updates that were applied to the master branch.
2021-07-22 17:33:31 +01:00
Mike Brady
1ca4ebcf02
Make some more error conditions terminate the program.
2021-06-30 10:13:13 +01:00
Mike Brady
f923e99f98
Terminate the program if the specified output device can not be found.
2021-06-30 10:02:46 +01:00
Mike Brady
5c08ccd4d0
Correct the information in a non-available frame rate error message from audio_alsa.c.
2021-06-30 09:49:16 +01:00
Mike Brady
6e24897d4d
Correct the information in a non-available frame rate error message from audio_alsa.c.
2021-06-30 09:46:41 +01:00
Mike Brady
0c7d385f35
Keep an eye on DAC underrun recoveries
2021-06-22 14:09:09 +01:00
Mike Brady
0f1118c142
Exit immediately if the speed or format cannot be set.
2021-06-06 15:48:09 +01:00