James Laird
28b4e6dde2
Return a nonzero value on error
2013-10-14 19:50:48 +11:00
James Laird
3b028bc337
Merge OpenBSD audio driver
2013-10-12 12:53:01 +11:00
Paul Lietar
9976d46805
Make a few fixes debian init script.
...
Add avahi as a start dependency, fix the provide line.
Also add a note about updating the logrotate file if non-standard
log and error files are used.
2013-09-29 00:55:30 +01:00
Dimitri Sokolyuk
21a7497fb5
fix shell script
2013-09-05 16:34:02 +02:00
Dimitri Sokolyuk
3286e0ded3
typo
2013-09-05 04:13:15 +02:00
Dimitri Sokolyuk
629e202f1b
add support for openbsd sndio sound daemon
2013-09-05 03:24:23 +02:00
James Laird
bb04e3b071
README: add debian package suggestions
2013-08-25 22:37:02 +10:00
James Laird
5ed2af178a
rtsp: send responses as single packets
...
Under some circumstances, RTSP responses would be split into multiple
packets. This causes Airfoil to barf, as it interprets the end of the
packet as the end of the response. Since TCP_CORK is not portable, this
fix buffers the packet on the stack before using a single write.
This fixes issue #213 .
2013-08-25 22:27:51 +10:00
James Laird
c267c8e4c3
rtsp: treat pthread_t as properly opaque
...
We use the mutex's state to determine whether the playing_thread is
valid or not. Also now use pthread_equal, as we should. Should address
issue #236 .
2013-08-25 21:02:57 +10:00
James Laird
3019a8526b
rtsp: don't try and take our own player lock
...
This can happen during a shutdown triggered by the playing thread. Fixes
issue #233 reported by therealmuffin.
2013-08-25 20:30:42 +10:00
James Laird
928dc8024c
Merge pull request #237 from jclehner/1.0-dev
...
Allow empty SET_PARAMETER request
2013-08-03 15:58:55 -07:00
Joseph C. Lehner
62472b5b58
Allow empty SET_PARAMETER request
...
Certain senders (AirAudio for Android for example) periodically
send SET_PARAMETER requests with Content-Length: 0, to which
shairport responds with an error, making those apps misbehave.
2013-08-03 17:36:18 +02:00
James Laird
159ab91602
Merge pull request #232 from plietar/fix-rtsp-close
...
Reset playing_thread on connection close. Fixes #217
2013-06-25 05:05:34 -07:00
Paul Lietar
fc2272a2a8
Reset playing_thread on connection close. Fixes abrasive/shairport#217
...
pthread seems to reuse thread identifiers (at least on arm).
Reset it to zero after closing a playing connection, or else future
thread might believe they are playing.
2013-06-25 10:57:22 +02:00
James Laird
fd14f2ef7b
daemon, shairport: POSIX compatibility fix
2013-06-21 19:42:00 +10:00
Paul Lietar and James Laird
e9f5e8a078
Do not print daemon's pid after forking if a pidfile is used.
2013-06-21 11:58:29 +10:00
Paul Lietar and James Laird
b4e962f6ba
Add a logrotate script.
2013-06-21 11:57:57 +10:00
Paul Lietar and James Laird
053277eaf0
Add and init script for debian.
2013-06-21 11:57:57 +10:00
Paul Lietar and James Laird
9848b17b77
Only ignore files in top directory.
...
For some reason, git ignored all subdirectories. This fixes it.
2013-06-21 11:57:57 +10:00
Paul Lietar and James 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
2ffcaa075d
configure: clean up pkg-config code into a function
2013-06-20 18:43:36 +10:00
James Laird
affeab54c9
Makefile: force rebuild after reconfigure
2013-06-20 18:33:51 +10:00
James Laird
984909668d
audio_ao, audio_pulse: make usage indent consistent
2013-06-20 18:30:42 +10:00
James Laird
5431aeb510
configure: fix message
2013-06-20 18:30:42 +10:00
James Laird
4a168e1a1a
TODO updates (nearly there!)
2013-06-20 18:30:42 +10:00
James Laird
c7bebe37f3
README.md: updates
2013-06-20 18:30:42 +10:00
Muffinman and James Laird
95035f3389
Alsa output driver
...
Based on a bit of code of @Skaman and bit of mine, I've added support
for mixer and audio Alsa support.
2013-06-20 18:30:42 +10:00
James Laird
9340e5b897
check supplied AP name length to comply with mDNS spec.
2013-06-20 17:20:33 +10:00
James Laird
3281242b91
shairport: do not try and deinit output if it hasn't been set yet
2013-06-20 17:20:01 +10:00
James Laird
d845e92eae
Tiny cleanup for merge
2013-06-20 17:09:13 +10:00
Paul Lietar and James Laird
ffdde63ecc
Use line buffering on log files.
...
This makes sure the contents are written on the disk, so the user can
read the log.
2013-06-20 17:02:56 +10:00
Paul Lietar and James Laird
b70505fd58
Support log redirection to a file.
2013-06-20 17:02:56 +10:00
Paul Lietar and James Laird
dbe13e399a
Remove pid file when exiting.
2013-06-20 17:02:56 +10:00
Paul Lietar and James Laird
c404660122
Move daemon related code to a separate file.
2013-06-20 17:02:56 +10:00
Paul Lietar and James Laird
5249a6e1d8
Add support to write pid to pidfile when running in daemon mode.
2013-06-20 17:02:56 +10:00
James Laird
c7d93b363a
Revert "Fix pulse audio output driver in daemon mode."
...
This reverts commit 8045e00d4f .
Now, pulseaudio can be initialised at startup, thus detecting connection
errors early.
Conflicts:
audio_pulse.c
2013-06-20 01:51:25 +10:00
James Laird
cb14d56a5b
Merge pull request #223 from plietar/pulseaudio
...
Add a PulseAudio output driver, courtesy of Paul Lietar
2013-06-19 08:37:09 -07:00
James Laird
24d81c0450
daemonising: fork before doing any audio init
2013-06-20 01:06:45 +10:00
James Laird
a38a03ed7d
audio: update usage messages
2013-06-20 01:06:08 +10:00
James Laird
b8e8a22cc2
add long options, and update usage message
2013-06-20 00:48:20 +10:00
James Laird
d699d43551
getopt_long: neater errors
2013-06-20 00:28:17 +10:00
James Laird
3aa8bab70b
add getopt_long implementation and detection
2013-06-20 00:23:00 +10:00
Paul Lietar
64b6f47e84
pulseaudio: Make the application name configurable
...
If no name is specified, use the AirPlay access point name.
2013-06-19 10:57:44 +02:00
Paul Lietar
f1ee022fd0
pulseaudio: fix option parsing
2013-06-19 10:22:51 +02:00
James Laird
706e4d6518
ao, shairport: fix option parsing
...
- don't push unrecognised args to the audio driver
- get ao to parse from first argument
- ao checks for unrecognised options
2013-06-19 13:56:11 +10:00
James Laird
7f7dd51761
Merge pull request #224 from plietar/fix-libao-driver-check
...
Fix libao output driver.
2013-06-18 20:20:44 -07:00
Paul Lietar
8045e00d4f
Fix pulse audio output driver in daemon mode.
...
libpulse was initialized before the fork. This caused calls to libpulse
made after the fork fail.
Now initialize lib pulse when we need it, after the fork.
2013-06-11 16:47:41 +02:00
Paul Lietar
a69c5f20f5
Add a PulseAudio output driver.
...
It uses libpulse's synchronous API, to output to PulseAudio
without using libao.
2013-06-10 15:44:27 +02:00
Paul Lietar
e301306a35
Fix libao output driver.
...
The driver id returned by libao wasn't checked correctly.
When the driver did not exist, libao returns a negative number. The
libao output driver checked for a non zero id.
This caused shairport to refuse to use the first driver, and not fail
when using a non-existant driver.
2013-06-09 20:32:29 +02:00
James Laird
38799dc1b1
rtsp: track and join all RTSP threads
2013-06-07 11:32:14 +10:00