Mike Brady
6c6dda9cce
Add ability for the jack back end to automaticlly connect a client when the jack server comes up and to drop the client when a play session is finished.
2018-09-02 17:25:29 +01:00
Mike Brady
959aa08b8f
Clean up the jack backend and add a few options.
2018-08-31 21:41:25 +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
ea20840d6c
Make the play function return a status (ignored for the present). Clean up audio_alsa by removing all the die calls and placing the alsa_mutex calls in pthread cleanup routines.
2018-07-29 13:45:42 +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
Till Zimmermann
02694948f3
Initial MQTT Version
2018-06-19 19:40:08 +02:00
Mike Brady
93f410599f
Add debug_mutex_unlock code in place of a regular pthread_mutex_unlock in some places.
2018-06-01 09:28:28 +01:00
Mike Brady
18b37ea254
Replace all pthread_mutex_locks with debug_mutex_lock with a message and timer. Not really tested.
2018-06-01 08:29:48 +01:00
Mike Brady
e66a47943d
Treat volume-based muting the same as playback-switch-based muting and disable both by default. Rename the setting to "use_hardware_mute_if_available".
2018-05-25 09:22:48 +01:00
Mike Brady
d9c9009ff2
Add the ability to pseudo-randomly drop audio packets to simiulate a noisy network.
2018-04-13 09:58:05 +01:00
Mike Brady
4aab0a6f92
Improve the scanner to start and stop properly and to release track data when remote control becomes unavailable.
2018-04-07 13:22:38 +01:00
Mike Brady
f9845d017b
Fix problem when reconnecting to an itunes play session.
2018-04-03 22:32:43 +01:00
Mike Brady
8bf83c149f
Modify latency detection to use the second word of a sync packet to decide whether to add an extra delay or not. Use all sync packets, not just one with the exception flag. Use 1024 buffers -- a bit profligate, but hey.
2018-04-02 16:42:46 +01:00
Mike Brady
69b3b5d776
Send rtsp events to the metadata thteread for handling. Begin to clean up signals.
2018-03-31 12:39:26 +01:00
Mike Brady
6dc30c6ca9
Add a few new elements ot the native dbus interface
2018-03-23 21:28:28 +00:00
Mike Brady
d692fab9e4
Clean up native dbus interface files and associated changes to existing files.
2018-03-20 16:31:59 +00:00
Mike Brady
fba40733f3
Add more basic remote control stuff, but SPS gets confused about who it can control.
2018-03-18 19:10:45 +00:00
Mike Brady
13931664ed
Check if locks are already acquired.
2018-03-16 15:57:35 +00:00
Mike Brady
9d9b0a1824
Add a Shairport Sync Diagnostics DBus Onject, only part working
2018-03-10 17:01:42 +00:00
Mike Brady
8991f3420c
Remove many causes of warnings at the -Wextra level
2018-03-07 20:48:21 +00:00
Mike Brady
c36a7822a3
Tidy up using clang-format
2018-03-07 14:35:25 +00:00
Mike Brady
07e46565ca
Eliminate almost all warnings from -Wall
2018-03-07 14:29:14 +00:00
Mike Brady
a7d82ae823
Begin to avoid strict aliasing violations -- not finished yet.
2018-03-07 08:58:23 +00:00
Mike Brady
283e4930e8
Add support for OpenBSD compilation
2018-02-09 21:11:39 +00:00
Mike Brady
a0bb2993df
Add timing to debug messages, make timing sender wait interruptable eveyr 20 ms, thus making TEARDOWN faster.
2018-02-03 20:24:58 +00:00
Mike Brady
f83b86ec23
Add the option to use a flat volume control profile.
2018-01-29 22:28:22 +00:00
Mike Brady
c6aa6fd27d
Add ability to diable resend request. Use a new "diagnostics" group in the configuration file and move log_verbosity and statistics to it.
2018-01-24 11:12:29 +00:00
Mike Brady
86b72a981a
Fix small compilation bug evident in FreeBSD
2018-01-23 10:18:02 +00:00
Mike Brady
4aaa8d19fe
Implement a rudimentary cover art file writing facility.
2018-01-16 22:22:03 +00:00
Mike Brady
e0aa75a80c
pretty-print after adding alsa volume-based mute capability
2018-01-13 20:15:27 +00:00
Mike Brady
3e5dbe9e1a
Move a play session's latency into the play session's data structure, duh.
2018-01-09 20:54:03 +00:00
Mike Brady
9cfc6c475b
use max-latency and min-latency information in AirPlay ANNOUNCE packets, remove different latency settings except one fixed one
2018-01-09 17:54:24 +00:00
Mike Brady
1637a79dd6
Add tinyhttp code for sending and reading responses. Clean up some dacp routines. Most new and modified rooutines untested.
2017-12-18 18:50:01 +00:00
Mike Brady
ea46a09aea
More comprhensive saving and restoring of hardware and software level when a session is stopped and started. Does hardware as well as software.
2017-12-11 16:32:37 +00:00
Mike Brady
6089007bc4
Store the last software volume setting so that it can become the default when the next play sessions starts. This is important if a starting volume is not always given, a new phenomenon in iOS 11.2 and macOS 10.13.2
2017-12-09 20:14:39 +00:00
Mike Brady
88c550663c
hooking up a dacp scanner
2017-12-02 19:52:39 +00:00
Mike Brady
bafdd94e33
Clang-format
2017-11-19 21:41:11 +00:00
Mike Brady
74f41a1769
Reorganise D-BUS interface code and introduce an MPRIS interface.
2017-11-19 16:08:39 +00:00
Mike Brady
3198ec4265
Improve dbus and add some dacp services
2017-11-12 14:26:10 +01:00
Belbo
b98e6a9ac0
Fixed race condition when stopping other threads with SIGUSR1
...
Many threads have a main loop that checks some exit variable in the loop condition. To stop a thread, another thread sets that exit variable, sends a SIGUSR1 to that thread to get it out of blocking calls like read(), write() or select(), and finally joins it.
There was a race condition though: if the signal arrived after the loop condition was checked but before the blocking system function was entered, the target thread essentially ignored the signal, made the blocking call anyway, and could get stuck forever there.
The only way around this race condition is to block SIGUSR1 in the destination thread during the critical time interval. This requires that the blocking system call and the call to unblock SIGUSR1 be an atomic unit. There is only one system call that makes this possible: pselect(), which takes a signal mask to replace the current signal mask with, but only while pselect() runs. Other functions like read(), recv(), write() and sendto() may only be called if we can be sure that they don't block. For this purpose, the file descriptors must be set to non-blocking mode and we must prepend the call to them with a call to pselect() to block until the socket becomes readable/writable.
2017-11-01 20:46:05 +01:00
Mike Brady
825b418b94
Make PID directory path creation recursive and tidy up some code formatting.
2017-09-24 15:52:26 +01:00
Mike Brady
5d5802db92
Create the directory for the PID file, if necessary
2017-09-23 05:25:48 -07:00
Mike Brady
e513e5330c
Tidy up source using clang-format
2017-07-31 11:57:57 +02:00
Mike Brady
9ba3ed39a5
Add some settings to the new PulseAudio backend. Limit the silent lead-in time to pipe and stdout backends. Not tested much.
2017-06-30 20:05:48 +01:00
Cody Cutrer
3e9e228564
read stdout from the on-start command to choose ALSA output device
...
refs GH-452
2017-06-24 19:46:03 -06:00
Mike Brady
d022c8b4b8
Add an extra option "-j" to daemonize withoput generating a PID file
2017-05-25 19:49:31 +01:00
Mike Brady
6195be0192
Change the order of evaluating command lione options so that the config file is read before any commands are executed.
2017-05-25 18:56:01 +01:00
Mike Brady
2dea79fa41
Add alsa_use_playback_switch_for_mute to the configuration data structure, so visible for debug summary.
2017-04-30 18:56:56 +01:00
Mike Brady
e37c277b0a
Add a "run_this_when_volume_is_set" facility to call a program when the volume is set. The AirPlay volume is passed.
2017-04-23 12:37:11 +01:00