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
Mike Brady
7860d69227
Move some globals into the thread parameter block. Add setting for logOutputLevel
2017-04-07 18:44:11 +01:00
Denys Berkovskyy
69c042585a
Fix various typos.
2017-03-21 11:16:05 +00:00
Yann Pomarede
2ab2a84c14
change function die, warn, inform and debug
...
change funcions die, warn, inform and debug argument from `char*` to `const char*` to prevent a warning in C==
2017-02-28 12:47:03 +01:00
Yann Pomarede
7b9cd28e90
2 audio filters added, a volume-dependent-loudness and a convolution filter.
2017-02-27 22:43:23 +01:00
Mike Brady
cf29625d2c
Clang Format
2017-02-11 12:12:07 +00:00
Mike Brady
2a4a4ed22b
Add volume_max_db setting which works on the hw mixer if it exists or the sw attenuator otherwise.
2017-02-05 16:18:05 +00:00
Mike Brady
2cab35cd55
Add a new setting to specify the interface the service should be provided on.
2017-02-05 13:47:01 +00:00
Mike Brady
0764199545
Add possibility of using an array of precalculated pseudo random numbers to reduce processor load.
2017-01-30 18:34:09 +00:00
Mike Brady
b5ee350b3c
Add *untested* support for S24_3LE and S24_3BE output format.
2016-09-28 11:47:44 +01:00
Mike Brady
0499743bd9
Make endian-independent. Allow users to specify only U8/S8/S16/S24/S32
2016-09-12 22:01:57 +01:00
Mike Brady
064bd293c5
Tidy up with a clang-format
2016-09-11 10:35:53 +01:00
Mike Brady
8d008fa2ec
Begin to add full-scale post processing. Does not compile.
2016-09-08 15:56:22 +01:00
Mike Brady
4849c1d429
Remove mersenne generator -- too slow, try another one
2016-09-07 16:55:14 +01:00
Mike Brady
ae84366e8d
Change over to times as opposed to frames for setting timing options
2016-09-04 19:37:22 +01:00
Mike Brady
ef851a927b
Enable 64-bit monotonic rtptime calculations
2016-09-02 16:53:52 +01:00
Mike Brady
945483d9c3
Merge support of apple's ALAC decoder
2016-08-28 21:38:24 +01:00
Mike Brady
a1519f2abe
Make it compile -- untested
2016-08-24 16:30:02 +01:00
Mike Brady
01e5128507
Add ability to set output format and output rate
2016-08-19 12:51:15 +01:00
Mike Brady
c1e07b98d1
add ability to not use mmap
2016-08-17 19:59:26 +01:00
Mike Brady
1fe705cf5f
Remove variable delay from non_blocking_write and include it whether metadata is enabled or not. Remove the INSTALL file and ignroe it in git.
2016-06-26 15:20:09 +01:00
Mike Brady
f36352dc4e
Add setting for the time to wait for the metadata pipe to come ready, otherwise give up. Default 5,000 milliseconds.
2016-05-23 14:03:38 +01:00
Mike Brady
46fac92f6c
Add a utility for string substitution, rename apname to service_name
2016-05-21 13:05:15 +01:00
Mike Brady
1bb56b4ca1
Change mono setting to playback_mode setting and add to config file.
2016-05-02 09:07:39 +01:00
mike
fd56780575
Added option to broadcast metadata over UDP
2016-04-27 12:09:19 +01:00
mike
46bcdce764
Added option for mono output
2016-04-24 21:25:24 +01:00
Mike Brady
890cdd68dd
Add regtype field and remove two own fields -- logfile and errfile
2016-04-01 16:26:04 +01:00
Mike Brady
7189e18d69
Change latency representations to long as that's closr to what alsa uses.
2016-03-29 16:07:22 +00:00
Mike Brady
548d07716a
Add field to disable synchronisation.
2016-03-26 21:37:17 +00:00
Mike Brady
b8b5b7fa1e
Restore ability to compile in FreeBSD
2015-12-28 20:38:51 +00:00
Mke Brady
73c3744e4c
Add check for processor endianness. Fix a small warning.
2015-11-29 20:59:11 +00:00
Mike Brady
4c70223f5a
Work in progress, doesn't compile
2015-11-05 18:03:58 +00:00
Mke Brady
3b88d05137
Add CYGWIN flag check to be recognised as Posix-enough (?)
2015-10-21 10:22:56 +01:00
Mke Brady
ddd76b10af
Add, untested, stuff to capture and remember a volume_range_db setting.
2015-10-07 08:40:10 +01:00