Sean McNamara [Wed, 7 Jan 2009 22:29:16 +0000 (23:29 +0100)]
--check: Updated manpage slightly and pulseaudio --help slightly.
It's good for new users - I didn't know about the convention for
daemon checks to only bump the exit code until, say, a year after I
first installed Linux. Of course, we could also put an entire guide to
using Linux in our manpage, or tell users how to check the exit code
with $?, or how to get to the terminal, or an example script, ... (you
can see how this would quickly get out of control). So just a little
bit more hint should be good for now. John? Does this work for you?
Sean
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Lennart Poettering [Sun, 21 Dec 2008 12:33:32 +0000 (13:33 +0100)]
Use FIONREAD instead of TIOCINQ
On Linux the two ioctls FIONREAD and TIOCINQ share the same number.
However TIOCINQ is used for terminals while FIONREAD is used (among
others) for sockets and pipes. Hence use FIONREAD here since it seems
more appropriate.
Lennart Poettering [Wed, 17 Dec 2008 19:30:01 +0000 (20:30 +0100)]
Load module-volume-restore and module-device-restore before all other modules
Since m-v-r and m-d-r become active in the FIXATE hooks for
stream/device creation we need to make sure the modules are loaded
before the first devices/streams are created.
Lennart Poettering [Wed, 17 Dec 2008 19:22:42 +0000 (20:22 +0100)]
Pass GDBM_NOLOCK to gdbm
gdbm still uses BSD lockf for locking which is incompatible with NFS.
Since we don't need the locking here since the db files in question
should never be accessed by more than one process since they are
per-home-dir and per-machine we can disable locking without any ill
results.
Lennart Poettering [Wed, 17 Dec 2008 18:53:58 +0000 (19:53 +0100)]
Don't mix front-center into rear channels
If there's a center channel on input that is not available on output
make sure we mix front-center only into front-left/right and rear-center
into rear-left/right.
Lennart Poettering [Tue, 16 Dec 2008 13:03:40 +0000 (14:03 +0100)]
Check if environ is actually set before we use it
Some applications seem to set **environ to NULL for various reasons.
Before we iterate through it we thus need to make sure it is actually
set to make sure we don't segfault.
Lennart Poettering [Sat, 1 Nov 2008 20:11:48 +0000 (21:11 +0100)]
Make sure libpulse never gets unloaded
When an .so is unloaded during runtime all TLS keys it has registered
need to be freed because the destructor callbacks of the TLS key might
otherwise point to invalid code. Hence it would appear sensible to
destruct the TLS keys from a function marked as __attribute__
((destructor)). However functions marked like that are also called when
an application terminates, on exit(). If a thread continues to run until
the very exit it might still want to access that TLS data. The
destructor functions are called while all other threads are still
running. If __attribute ((destructor)) is used to destruct TLS keys for
such threads this might hence cause a crash when the application shuts
down.
To circumvent this problem we'll now compile libpulse with -z nodelete,
to make it unnecessary to delete the TLS data ever and thus avoiding the
problem. It's suboptimal, but for now I see no better solution.
Colin Guthrie [Thu, 3 Jul 2008 22:49:01 +0000 (23:49 +0100)]
Implement hardware volume control.
This allows near instant change of volume when controlling the hardware but the stream volume still suffers from a sizable delay.
Colin Guthrie [Wed, 11 Jun 2008 00:02:10 +0000 (00:02 +0000)]
Still send silence when we are not doing anything else, but also flush the buffers correctly upon recovery from suspension.
Close the RTP socket correctly after passing messages about.
When not sending silence, the RTSP socket will be closed after some period of inactivity. I'm not sure why this is.
Sending silence keeps things working and with the flushes after suspension we now get a better latency. As this relies on the auto-suspend feature, it's not exactly ideal.
Typical latencies are currently about 3s which makes it more or less usuable for listening to music.
If the connection is disconnected, it will reconnect but I've found that the second connection is silent. Hopefully the silence will prevent the first connection dropping.
Refs #69
Colin Guthrie [Tue, 10 Jun 2008 23:55:58 +0000 (23:55 +0000)]
Add some new public API functions to connect and flush.
This allows us to reconnect upon disconnection but this has thus far proved unreliable.
We no longer close the socket. We leave this to the module thread to do the closing.
We can also flush the remote buffer now.
Refs #69
Colin Guthrie [Tue, 10 Jun 2008 23:49:35 +0000 (23:49 +0000)]
Change the API of the RTSP client a bit.
* Store the mainloop, hostname and port internally on construction
* This should allow use to easily reconnect if disconnected although this has thus far proved unreliable.
The changes look like more than they are due to moving a function around.
Colin Guthrie [Mon, 26 May 2008 23:43:51 +0000 (23:43 +0000)]
A few related changes:
* Change the encode_sample routine to simply return normal memchunks allocated from the mempool.
* unref the memchunks returned from encode_sample when we are done with them.
* Create an encoded 'silence' sample and play this at all times to prevent hangup and to 'hog' the airtunes device
This now works and can be used as a regular sink albeit with a constant latency of about 8 seconds :s
Colin Guthrie [Mon, 26 May 2008 21:05:53 +0000 (21:05 +0000)]
Set the send buffer size to prevent rendering silence in amongst our good data (this should be more sophisticated but that can wait for a glitch-free port)