Commit Graph
56 Commits
Author SHA1 Message Date
Mike Brady a53b4c5c36 Fix some warnings from clang on FreeBSD. One was significant -- the randarray stuff didn't look right. 2017-04-16 16:52:43 +01:00
Tobias Kortkamp c9e378f515 FreeBSD doesn't have ETIME but both FreeBSD and Linux know ETIMEDOUT 2017-04-15 02:28:57 +02:00
Mike Brady 5855264eff Improve error reporting in non-blocking write code 2017-04-07 18:45:28 +01: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
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 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 62aaf07478 Add support for mbed TLS and deprecate polarssl support 2017-01-30 08:21:12 +00: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 945483d9c3 Merge support of apple's ALAC decoder 2016-08-28 21:38:24 +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 a1b975106a Quieten some debug messages. 2016-05-26 08:28:06 +01:00
Mike Brady fd336f45c4 Merge pull request #314 from joerg-krause/development
Fix build without metadata support
2016-05-23 23:11:00 +01:00
Mike Brady e5c6ea8b29 Add some diagnostics to non_blocking_write/3. 2016-05-23 21:10:15 +01:00
Jörg Krause 28efe16f73 Fix build without metadata support
Commit f36352dc4e introduced the parameter
pipe_timeout for the metadata config. If shairport-sync is now configured
without metadata support, the build fails with:

```
shairport.c: In function ‘main’:
shairport.c:766:9: error: ‘shairport_cfg {aka struct <anonymous>}’ has no member named ‘metadata_pipe_timeout’
   config.metadata_pipe_timeout = 5000; //milliseconds

```

Fix this by opting-out the affected code with CONFIG_METADATA.
2016-05-23 22:01:46 +02:00
Mike Brady 870de08db5 Add a little extra diagnostic to nno-blocking write 2016-05-23 16:43:02 +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 5f6f4a2636 replace the nonblocking write code 2016-05-23 11:58:22 +01:00
Mike Brady 46fac92f6c Add a utility for string substitution, rename apname to service_name 2016-05-21 13:05:15 +01:00
Jörg Krause f230e3e543 Fix vol2attn
This fixes calculation of the scaled attenuation if `max_dB` is different from
zero.

Closes: https://github.com/mikebrady/shairport-sync/issues/290
2016-05-09 15:10:37 +02:00
Mike Brady d02bb0e336 If the volume is out of range 0 -- -30 or -144, return minimum vol 2016-04-27 10:23:15 +02:00
Mike Brady e3986855dd Add type check comment. 2016-03-26 21:36:40 +00:00
Mke Brady 3b88d05137 Add CYGWIN flag check to be recognised as Posix-enough (?) 2015-10-21 10:22:56 +01:00
Mike Brady 1b52e26f8f Move non-blocking-write code here from rtsp.c 2015-08-06 14:30:44 +02:00
Mike Brady 670dd933a2 Use the renamed linux compilation flag renamed to include the word freebsd 2015-08-01 14:36:42 +02:00
Mike Brady cc4d9ece42 Revert back to CLOCK_MONOTONIC from CLOCK_MONOTONIC_RAW because OpenWrt doesn't recognise it 2015-07-02 15:17:36 +01:00
Mike Brady 8892561917 Use CLOCK_MONOTONIC_RAW for better timing estimation 2015-06-29 09:08:58 +00:00
Mike Brady 129a4dc568 Add declaration file of waitpid 2015-06-28 15:37:22 +01:00
Mke Brady 87a0475c16 Reformat using clang-format. 2015-06-01 23:16:50 +01:00
Mike Brady c2383d4942 Fix flush glitch, add artwork request to metadata set. 2015-03-18 21:02:49 +00:00
Mke Brady a6f156cfc0 Adjust the volume transfer function to be a bit steeper in mid to high volume 2015-03-16 21:11:04 +00:00
Mike Brady a2790fc102 Improve metadata output -- maybe it works reliably now. Add call to get audio parameters from back ends, to be able to give volume metadata. 2015-03-16 11:11:54 +00:00
Mike Brady 705a0be1e4 Add new optioons --statistics to print out the, um, statistics, and remove them from debug level 1. 2014-11-21 17:39:27 +00:00
Mke Brady eef08e4975 Change SIGUSR2 to turn on and off reserving the output device. 2014-10-19 16:43:59 +01:00
Mike Brady dc360d45c3 Adjust slope of volume control to be a bit faster at the lower end -- diagrams not updated. 2014-09-16 12:50:30 +01:00
Mike Brady 8548cdc67d Modify the volume control profile to make the lower range slower to progress -- seems smoother overall on a 120db (nominal) device. 2014-09-15 21:12:59 +01:00
Mike Brady 0733e962bb rename absolute_time_in_ns to absolute_time_in_fp (more accurate name). Fix osx timing calculation. 2014-09-07 12:31:23 +01:00
Mke Brady 3466530c9e Use popt library to allow on-start and on-stop commands to have arguments 2014-09-01 22:00:19 +01:00
Mike Brady 75fe108eb7 Add support for PolarSSL, some OS X stuff, centralised absolute timing, -B and -E command execution. Bug fixes. 2014-08-24 16:14:17 +01:00
Mike Brady 1a0932d92a Remove extra returns and generally clean up some debug messages. 2014-05-19 19:12:13 +01:00
Mike Brady 0b07f99f9e Unify and clean up shutdown. 2014-05-19 18:35:46 +01:00
Mike Brady d89e516c77 Remove references to daemon.h, add libdaemon stuff, update options. 2014-05-18 23:06:17 +01:00
Mike Brady db5ef58f82 Adjust Volume Control Transfer function to make it a bit slower at very low volumes. Add PDF of transfer function and Mac Grapher source document. 2014-05-17 13:11:25 +01:00
Mike Brady 34c52224df Add function vol2attn to return an attenuation for a given volume. Needed in alsa as well as in player. 2014-05-09 17:53:40 +01:00
James Laird 82518dc334 whitespace cleanups 2013-10-22 10:44:40 +11:00
James Laird 28b4e6dde2 Return a nonzero value on error 2013-10-14 19:50:48 +11:00
Paul LietarandJames Laird aef689c07c In daemon mode, send error messages to parent to write them on stderr.
This allows to get a better error message than "Spawning the daemon failed."
when initialization fails.

The error message is sent through the pipe. When init is OK, just send
a null byte.
2013-06-21 11:54:13 +10:00
James Laird 8259ae60e8 die/warn functions now have implicit newline at the end 2013-06-04 00:30:17 +10:00