Commit Graph
4730 Commits
Author SHA1 Message Date
Dan McGee 0b4c7ad4be hairplay: various small code cleanups 2012-02-24 15:53:30 -06:00
Dan McGee cd957048cb Use the audio buffer mutex appropriately
We need to use this any time we write to or access any of the
audio-buffer related variables. This also removes the need to use
'volatile', which cripples the compiler optimizations.
2012-02-24 15:53:28 -06:00
Dan McGee 8b1728d946 Use a pthread mutex around the volume settings
Using the `volatile` qualifier in multithreading code is never the right
answer. Mutexes should be used as was attempted with the audio buffer
code. Here, we implement a new mutex for the volume and fix_volume
globals, and grab a lock on it when necessary, which is for both reads
and writes.
2012-02-24 15:52:54 -06:00
Dan McGee 0a446a421d Return the correct value from biquad_filt()
If you turned set `debug = 1` in hairtunes, you'd quickly get a mess of
debug messages that showed bf_est_drift in bf_est_update() going quicky
out of range toward a float NaN value (usually negative). Clearly the
presence of this `out` variable in biquad_filt was meant to be used, not
marked as unused.
2012-02-24 15:52:54 -06:00
Dan McGee 74ed9c6fa2 hairtunes: use static keyword appropriately
This allows the compiler to do a much better job on this file, as it
currently can't inline most of the functions because they are
technically visible outside the file. Mark most functions and variables
static to let the compiler work.
2012-02-24 15:52:53 -06:00
Dan McGee 565b223bb0 Don't require extern usage of frame buffering value
This makes things a bit cleaner and easier to grasp.
2012-02-24 14:33:05 -06:00
Dan McGee 82e7cf8490 Fix dependency issue in Makefile
Make the dependency and compile command match in the resources used.
2012-02-24 14:24:10 -06:00
B. van BerkumandDan McGee be145fa704 Removed typo in Makefile 2012-02-24 14:20:06 -06:00
Stef SimoensandDan McGee d9964383e6 Improve resending of frames (and avoid missed frames)
- when requesting a packet, do not request an already received packet
- move the last-chance resend to buffer_get_frame
- check more often for missing frames
  own checks show that some frames need to be requested up to 4 times
  on bad connections
2012-02-24 14:18:52 -06:00
Dan McGee 7fcfd3ddac Small socketlib static and return value tweaks 2012-02-24 14:17:30 -06:00
Dan McGee f5e7e87c51 Remove dead code in alac.c 2012-02-24 14:13:23 -06:00
Albert Zeyer d2b2a34311 Merge pull request #135 from alenichev/master
Fix compilation error
2012-01-12 07:26:36 -08:00
Dmitry Alenichev 0d0299dcfa OpenBSD installation instructions 2012-01-12 11:59:43 +04:00
Dmitry Alenichev 58f307eab4 fix gentoo & openbsd compilation errors 2012-01-11 19:57:41 +04:00
JH Laird 4172b696e0 Merge pull request #123 from juhovh/master
RSA and AES cleanup
2012-01-08 15:22:12 -08:00
James Laird 6ce7675820 Reap child processes in shairport.c 2012-01-09 10:18:17 +11:00
Juho Vähä-Herttua 0fdae6f521 Cleanup the AES decryption code a bit 2011-11-10 15:50:51 +02:00
Albert Zeyer 83c1b71645 install.md: debian/ubuntu also needs build-essential 2011-11-10 00:36:48 +01:00
Juho Vähä-Herttua 2b8602bdc0 Remove trash bytes from the RSA private key 2011-10-30 16:13:52 +02:00
Albert Zeyer 2d8f4aff7e Merge pull request #120 from stefdude/master
1 x bugfix, 1 x improvement, 1 x new feature
2011-10-10 04:26:22 -07:00
Stef Simoens 9796ac354c new feature: run program on first connection / run program on last
disconnection

I was looking to trigger an action when I connect to shairport.
Basically, I want to switch on the stereo when I start playing music
over shairport (and I want to switch if off when I stop streaming).

Because my set-up will be different than any other set-up, I thought
about making it generic.

Two new command-line options --play_prog and --stop_prog take one
argument: the command line to start when the first connection is made or
when the last connection quits.

Example:
$ shairport.pl --play_prog="amixer set PCM 100%"
2011-10-10 09:26:43 +02:00
Stef Simoens 800453f62b Send "last-chance retry" only once
The last-chance resend was sometimes fired up to 6 times (probably while
receiving multiple new packets while playing the same buffer-data).

The following patch corrects this: only one retry is sent out.
For this to happen, I change abuf->ready to -1 ("1 retry sent out") and
by changing the other comparisons of abuf->ready to != 1.

Probably, this could be improved, by implementing a first check at t-30,
t-20, t-10, ...
2011-10-10 09:23:19 +02:00
Stef Simoens 62607b2b5e BUFFER_FRAMES needs to be a power of 2 because of the way BUFIDX(seqno) works 2011-10-10 09:16:20 +02:00
Albert Zeyer ca6dcc7406 hw_addr from apname 2011-10-06 14:48:47 +02:00
abrasive d6b1c0a82d Remove random hardware ID.
This means you can't run multiple shairports under the same name,
barring a portable way to get the real interface ID.
2011-10-06 12:38:46 +11:00
Albert Zeyer d345b02215 Merge pull request #114 from symm/master
Fixed an issue with the init script
2011-09-17 10:07:47 -07:00
Gareth Jones 3e6cc0e45f Fixed an issue with init script stop action.
Unable to stop the daemon because a pid file was not being created.
2011-09-17 17:08:22 +01:00
Albert Zeyer 9583d83824 Merge pull request #112 from doubledrones/master
Gentoo installation HOWTO
2011-09-06 10:12:26 -07:00
Marcin Nowicki 5af8fe8a42 Add Gentoo/Funtoo installation howto. 2011-09-06 16:45:54 +02:00
Albert Zeyer 346db95445 Merge pull request #108 from lgarron/master
Small Mac commenting fixes to INSTALL.md
2011-08-11 03:07:28 -07:00
Lucas Garron bf81943a86 Perl installations seemed to require sudo for me. 2011-08-11 03:03:47 -04:00
Lucas Garron 36fb64d174 Added more # comment delimiters to the Mac instructions (to make copy-pasting safer/easier). 2011-08-11 02:58:57 -04:00
Albert Zeyer e633ccb8c8 Merge pull request #105 from sbleon/master
Install documentation fix for recent Debian/Ubuntu releases.
2011-08-02 19:42:31 -07:00
sbleon 7646a02a70 Removed libao2 package from Debian/Ubuntu package install list since the package name varies on different releases. The proper version will always be installed because libao-dev depends on it. 2011-08-02 21:13:54 -03:00
Albert Zeyer 4b0f579bd3 Merge pull request #104 from propaganda23/master
Perl strict mode error
2011-07-21 15:51:02 -07:00
Jan Ortgies 94007b71e5 Fix global symbol error (perl strict mode) 2011-07-21 19:53:03 +02:00
Albert Zeyer 8a0fda207a Merge pull request #103 from meurkens/master
Fix for https://github.com/albertz/shairport/issues/101
2011-07-21 05:53:15 -07:00
Stijn Meurkens ac66238fd7 Fixing password-problem on iOS 2011-07-21 14:41:13 +02:00
Albert Zeyer 8435f6af7b Merge pull request #98 from yuvalt/master
ipv6 was broken again...
2011-06-17 02:15:58 -07:00
Yuval Tal 33a8091ed7 byte order was wrong for ipv4 address on top of ipv6 2011-06-14 09:52:39 +03:00
Albert Zeyer 587f217967 Merge pull request #96 from kayahr/port
Added port option.
2011-06-05 03:20:00 -07:00
Klaus Reimer 565d2819b4 Added port option. 2011-06-05 11:56:50 +02:00
Albert Zeyer 6867754f33 Merge pull request #94 from Jonty/master
Documentation fix for Debian install
2011-06-01 15:11:54 -07:00
Jonty 2bca87a8da Pkg-config is required, fix debian doc 2011-06-01 21:53:17 +01:00
Albert Zeyer 3231f2df96 more cross platform check 2011-05-30 16:52:32 +02:00
Albert Zeyer 2776a4e47e change default port to 5002 as in #90.
this doesn't fix #34 though -- this should still be added, i.e. some automatic fallback to just any random free port.
2011-05-30 15:37:36 +02:00
Albert Zeyer f8c49423df Merge pull request #89 from yuvalt/master
Fix situation where ipv6 address is actually ipv4 address
2011-05-29 14:51:22 -07:00
Yuval Tal 272c288dfe fix compilation on linux 2011-05-29 17:49:05 +03:00
Yuval Tal 2c76375ca3 fix situation where ipv6 addresses are actually ipv4 addresses 2011-05-29 17:05:56 +03:00
Albert Zeyer 90d03a1b47 Merge branch 'master' of github.com:albertz/shairport 2011-05-29 15:10:39 +02:00