summaryrefslogtreecommitdiff
path: root/common.c
Commit message (Collapse)AuthorAge
* Use snprintf in place of sprintf.Mike Brady2018-04-08
|
* Rememeber the debug message of the previous request to lock the mutex.Mike Brady2018-04-08
|
* Use snprintf in place of sprintf and initialise mutexes for debugging.Mike Brady2018-04-08
|
* Modify latency detection to use the second word of a sync packet to decide ↵Mike Brady2018-04-02
| | | | 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.
* Send rtsp events to the metadata thteread for handling. Begin to clean up ↵Mike Brady2018-03-31
| | | | signals.
* Format after adding a few new elements ot the native dbus interfaceMike Brady2018-03-23
|
* Add a few new elements ot the native dbus interfaceMike Brady2018-03-23
|
* Clean up native dbus interface files and associated changes to existing files.Mike Brady2018-03-20
|
* Add more basic remote control stuff, but SPS gets confused about who it can ↵Mike Brady2018-03-18
| | | | control.
* Check if locks are already acquired.Mike Brady2018-03-16
|
* Add a Shairport Sync Diagnostics DBus Onject, only part workingMike Brady2018-03-10
|
* Tidy up using clang-formatMike Brady2018-03-07
|
* Eliminate almost all warnings from -WallMike Brady2018-03-07
|
* Begin to avoid strict aliasing violations -- not finished yet.Mike Brady2018-03-07
|
* Add timings to warnings and die messages if debugging is enabled.Mike Brady2018-02-20
|
* Add support for OpenBSD compilationMike Brady2018-02-09
|
* Quieten some debug messages.Mike Brady2018-02-05
|
* Add timing to debug messages, make timing sender wait interruptable eveyr 20 ↵Mike Brady2018-02-03
| | | | ms, thus making TEARDOWN faster.
* Add the option to use a flat volume control profile.Mike Brady2018-01-29
|
* Fix small compilation bug evident in FreeBSDMike Brady2018-01-23
|
* Brown bag update. Fix compilation errors when neither mpris nor dbus is ↵Mike Brady2018-01-17
| | | | selected.
* Implement a rudimentary cover art file writing facility.Mike Brady2018-01-16
|
* Fixed race condition when stopping other threads with SIGUSR1Belbo2017-11-01
| | | | | | | | 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.
* Fixed loop condition in non_blocking_write()Belbo2017-10-31
| | | | The while loop should be repeated, if the last write attempt was a partial write only. In this case, however, rc is greater than 0 (should be 1), not equal to 0.
* Prevent buffer overflow in log functionsBelbo2017-10-31
| | | | die(), warn(), debug() and inform() write the string into a limited internal buffer first. They now use vsnprintf() instead of vsprintf() to prevent an overflow of that buffer.
* 3.1.2 pretty-print using clang-formatMike Brady2017-09-07
|
* Add fixes suggested by using "infer"Mike Brady2017-09-03
|
* Fix some silent issues that were highlighted by "infer"Mike Brady2017-09-03
|
* Improve handling of player lock and simplify handling of loss of connection ↵Mike Brady2017-08-27
| | | | and improve some debug messages
* Tidy up source using clang-formatMike Brady2017-07-31
|
* read stdout from the on-start command to choose ALSA output deviceCody Cutrer2017-06-24
| | | | refs GH-452
* Add a "run_this_when_volume_is_set" facility to call a program when the ↵Mike Brady2017-04-23
| | | | volume is set. The AirPlay volume is passed.
* Fix some warnings from clang on FreeBSD. One was significant -- the ↵Mike Brady2017-04-16
| | | | randarray stuff didn't look right.
* FreeBSD doesn't have ETIME but both FreeBSD and Linux know ETIMEDOUTTobias Kortkamp2017-04-15
|
* Improve error reporting in non-blocking write codeMike Brady2017-04-07
|
* change function die, warn, inform and debugYann Pomarede2017-02-28
| | | | change funcions die, warn, inform and debug argument from `char*` to `const char*` to prevent a warning in C==
* Clang FormatMike Brady2017-02-11
|
* Add volume_max_db setting which works on the hw mixer if it exists or the sw ↵Mike Brady2017-02-05
| | | | attenuator otherwise.
* Add possibility of using an array of precalculated pseudo random numbers to ↵Mike Brady2017-01-30
| | | | reduce processor load.
* Add support for mbed TLS and deprecate polarssl supportMike Brady2017-01-30
|
* Tidy up with a clang-formatMike Brady2016-09-11
|
* Begin to add full-scale post processing. Does not compile.Mike Brady2016-09-08
|
* Remove mersenne generator -- too slow, try another oneMike Brady2016-09-07
|
* Merge support of apple's ALAC decoderMike Brady2016-08-28
|
* Remove variable delay from non_blocking_write and include it whether ↵Mike Brady2016-06-26
| | | | metadata is enabled or not. Remove the INSTALL file and ignroe it in git.
* Quieten some debug messages.Mike Brady2016-05-26
|
* Merge pull request #314 from joerg-krause/developmentMike Brady2016-05-23
|\ | | | | Fix build without metadata support
| * Fix build without metadata supportJörg Krause2016-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f36352dc4ece27fda24ef736183b8ff5729b8c96 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.
* | Add some diagnostics to non_blocking_write/3.Mike Brady2016-05-23
|/
* Add a little extra diagnostic to nno-blocking writeMike Brady2016-05-23
|