Commit Graph

7871 Commits

Author SHA1 Message Date
Denis Krjuchkov
0bcc477d46 decoder/OggFind.cxx: include stdio.h for SEEK_END definition 2013-11-18 16:28:39 +06:00
Max Kellermann
d2679f59c5 PcmConvert: add methods Open(), Close()
Replaces Reset() and eliminates the AudioFormat parameters from the
Convert() method.
2013-11-13 21:06:33 +01:00
Max Kellermann
4ee147ea34 DecoderAPI: stop decoder on MPD error
This commit adds the basic infrastructure for reporting bugs from
DecoderAPI.cxx via DecoderThread.cxx to DecoderControl.
2013-11-13 20:57:13 +01:00
Max Kellermann
f1ca61d7d7 DecoderInternal: allocate PcmConvert dynamically
Reduce header dependencies and allow it to be nullptr to disable it.
2013-11-13 19:16:31 +01:00
Max Kellermann
a80b5cf19b DecoderInternal: move functions into the class 2013-11-13 19:13:47 +01:00
Max Kellermann
44ac84767e PcmResampleFallback: use PcmBuffer instead of PcmResampler
Lighter API.
2013-11-13 18:39:15 +01:00
Max Kellermann
a40d7ae4dd configure.ac: prepare version 0.19 2013-11-13 18:39:10 +01:00
Max Kellermann
35297f8d4f release v0.18.4 2013-11-13 18:26:01 +01:00
Max Kellermann
6f4202408c doc/example: remove "format" and "audio_output_format"
Just an attempt to prevent users from shooting themselves in the foot
by uncommenting these lines without knowing what they're doing.
2013-11-11 17:18:29 +01:00
Max Kellermann
0b6548a282 util/RefCount: no "constexpr" with libc++
Not supported by libc++.
2013-11-11 12:27:16 +01:00
Max Kellermann
faf5821816 util/LazyRandomEngine: make min()/max() static+constexpr
Required for building with libc++.
2013-11-11 12:27:15 +01:00
Max Kellermann
188673b746 output/httpd: don't use incomplete template argument with libc++ 2013-11-11 08:31:50 +01:00
Max Kellermann
287c70e361 filter/route, ...: add missing stdlib.h includes 2013-11-11 08:20:09 +01:00
Max Kellermann
f6b44af998 DespotifyUtils: add missing stdio.h include 2013-11-11 08:20:09 +01:00
Max Kellermann
84c3d9674f DecoderAPI: add missing math.h include 2013-11-11 08:18:54 +01:00
Jurgen Kramer
47d3758820 decoder/dsdiff: fix byte order bug 2013-11-10 16:49:39 +01:00
Max Kellermann
573ff3a24f DecoderThread: add missing <functional> include 2013-11-09 09:54:12 +01:00
Max Kellermann
32fcc22cb3 configure.ac: prepare for 0.18.4 2013-11-09 09:52:51 +01:00
Max Kellermann
daba1238b5 release v0.18.3 2013-11-08 12:55:12 +01:00
Max Kellermann
d125567f4a doc/developer: add text from the wiki 2013-11-08 12:54:16 +01:00
Max Kellermann
993eca9327 Makefile.am: disable dist-bzip2
bzip2-compressed tarballs are obsolete, xz is better and widely
understood.
2013-11-08 12:29:56 +01:00
Max Kellermann
e314844a4d doc: show .tar.xz in sample unpack command 2013-11-08 12:29:04 +01:00
Max Kellermann
017bc564af doc: replace the remaining wikia links 2013-11-08 12:26:07 +01:00
Max Kellermann
e076ff9085 DecoderAPI: log without holding mutex 2013-11-08 12:15:05 +01:00
Max Kellermann
2789493a5f PlayerThread: fix stuck MPD after song change (0.18.2 regression)
Commit 77c63511 caused MPD to become stuck right after a song change.
The problem was that at some point, the MusicBuffer became full, and
the DecoderThread working on the next song waits for the PlayerThread.
However, the PlayerThread was stuck in a loop of g_usleep() calls, and
never bothered to tell the DecoderThread that the MusicBuffer is not
full anymore.  This bug is very old, but its chance to occur went from
nearly 0% to nearly 100%.

The fix is to wake up the DecoderThread before waiting for it.  As a
side effect, I replaced the g_usleep() call with a Cond::Wait() call.
2013-11-08 12:02:21 +01:00
Max Kellermann
4ed0635447 DecoderInternal: simplify need_chunks()
Remove the "do_wait" parameter which is always true.  Check only
command==NONE and merge the "return" statements.
2013-11-08 11:59:56 +01:00
Max Kellermann
1904e504be DecoderInternal: don't wake up player in need_chunks
Nothing of interest happens here.  No need to wake up the player.
2013-11-08 11:58:23 +01:00
Max Kellermann
834715ea2f configure.ac: prepare for 0.18.3 2013-11-08 11:57:37 +01:00
Max Kellermann
380a3bbff4 release v0.18.2 2013-11-07 18:48:04 +01:00
Max Kellermann
6219326e02 doc: more information about "close" 2013-11-07 18:41:53 +01:00
Max Kellermann
6c4de5106b doc: remove documentation on obsolete tcp_keep_alive options 2013-11-07 18:39:55 +01:00
Max Kellermann
e936705840 doc: add link to user manual 2013-11-07 18:36:55 +01:00
Max Kellermann
9b2603b6f6 doc: update current maintainer 2013-11-07 18:34:57 +01:00
Max Kellermann
88856b847c doc: update Mantis link 2013-11-07 18:34:04 +01:00
Max Kellermann
f679878f7b doc/user: add more documentation for the proxy database plugin 2013-11-07 18:31:56 +01:00
Max Kellermann
f33acf8758 input/cdio_paranoia: add setting "default_byte_order"
Allows big-endian users to configure the fallback byte order to
little-endian.  Without this setting, MPD assumes native byte order if
the CD drive can't decide.
2013-11-07 18:17:54 +01:00
Max Kellermann
a846a4c643 AvahiPoll: don't close the dbus socket
Avoid closing it twice.
2013-11-07 01:10:07 +01:00
Max Kellermann
899c2bb9cc input/curl: unregister removed sockets from epoll
Fixes a crash bug.  See code comment.
2013-11-07 01:10:07 +01:00
Max Kellermann
f8f95e2dbd OutputControl: reduce the number of OutputThread wakeups
Wake up the OutputThread only if it hasn't already been woken up and
if it isn't already in the playback loop.
2013-11-06 23:51:17 +01:00
Max Kellermann
77c63511d8 PlayerThread: reduce the number of DecoderThread wakeups
After the number of decoded chunks has fallen below the threshold, the
PlayerThread woke up the DecoderThread over and over.  This commit
adds a boolean flag that avoids these duplicate wakeups, and thus
reduces the number of system calls.
2013-11-06 23:51:17 +01:00
Max Kellermann
0be5a6ab2b DecoderControl: reduce the number of PlayerThread wakeups
Wake up the PlayerThread only if it is really waiting for the decoder.
This greatly reduces the number of system calls in the DecoderThread.
2013-11-06 23:51:17 +01:00
Max Kellermann
9802e74859 DecoderInternal: lock DecoderControl in _flush_chunk()
Must hold the Mutex to signal the Cond object safely.
2013-11-06 23:51:17 +01:00
Max Kellermann
8e7d6eb151 DecoderInternal: wake up the player thread in _flush_chunk()
Merge duplicate code.
2013-11-06 23:51:17 +01:00
Max Kellermann
5c18e4f114 event/FullyBufferedSocket: remove obsolete TODO comment
We have a better solution now.
2013-11-06 23:50:36 +01:00
Max Kellermann
fd2eafa7c6 ClientRead: "close" flushes the output buffer
Add a new CommandResult code called "FINISH" which, unlike "CLOSE",
will attempt to flush the output buffer.  This is a one-shot attempt;
it will do one write, and not try again.
2013-11-06 22:01:06 +01:00
Max Kellermann
422b8472fe event/FullyBufferedSocket: try to write without extra roundtrip
Postpone the write using IdleMonitor instead of scheduling a write
event.  This reduces the number of system calls, because we don't need
to register and unregister the write event in epoll.
2013-11-06 21:52:24 +01:00
Max Kellermann
5b213b0504 event/FullyBufferedSocket: make WriteFromBuffer() protected
.. and rename it to Flush().
2013-11-06 21:52:09 +01:00
Max Kellermann
ad27d06979 PlayerThread: enable buffering when starting playback
For some reason, this got lost in commit 975deca8.

Re-enabling this fixes stuttering at the beginning of radio streams.
2013-11-06 20:14:38 +01:00
Max Kellermann
c4b1251d0a configure.ac: require libaudiofile 0.3 due to API breakage
Prior to version 0.3, the "length" callback returned a "long" instead
of AFfileoffset.  Now that this API bug fix is a few years old, let's
drop 0.2 support for good.
2013-11-06 20:04:21 +01:00
Max Kellermann
01891f8815 input/curl: fix bug with redirected streams
Migrate from the old curl_multi_perform() API to the newer
curl_multi_socket_action() API (since CURL 7.16).

This allows working around a bug with HTTP redirections with epoll:
when CURL closes a socket and the new one happens to have the same
file number, MPD did not have a chance to remove the old one from
epoll and subsequently attempted to use EPOLL_CTL_MOD, which was not
allowed by epoll, because it's a new socket now.
2013-11-06 19:14:22 +01:00