Commit Graph

7235 Commits

Author SHA1 Message Date
Max Kellermann e53a25cbae event: add API documentation 2013-11-24 19:28:04 +01:00
Max Kellermann 41e7145973 event/SocketMonitor: add missing space 2013-11-24 16:07:12 +01:00
Denis Krjuchkov db238cc23f CommandLine: new command line parser
This implementation behaves mostly identical to old parser.
Few observable differences:
- There are no option groups (single group is used for all options)
- Option --stdout is hidden (it has been obsolete for a long time)
- MPD executable name (mpd) is hardcoded for simplicity
2013-11-24 17:29:05 +06:00
Max Kellermann 75e9c798e0 archive/iso9660: simplify _read() 2013-11-23 18:51:38 +01:00
Max Kellermann 99527051b5 Merge branch 'v0.18.x' 2013-11-23 18:45:02 +01:00
Max Kellermann 73f45d87d5 decoder/{dsf,dsdiff}: eliminate useless assignments 2013-11-23 18:30:12 +01:00
Max Kellermann ae88ba986e archive/iso9660: eliminate useless assignments 2013-11-23 18:30:12 +01:00
Max Kellermann d6247902ec input/curl: work around stream resume bug (fixed in libcurl 7.32.0) 2013-11-23 12:13:41 +01:00
Max Kellermann a566c28a49 input/curl: add global variable "curl_version" 2013-11-23 12:08:46 +01:00
Max Kellermann 2eddb63a83 input/curl: dump version number 2013-11-23 12:02:39 +01:00
Max Kellermann fc7d5b055d PcmResampleLibsamplerate: clip 24 bit data
Using pcm_resample_lsr_32() for 24 bit samples works, but may cause 24
bit overflows.  This commit makes 24 bit a special case with explicit
clipping.
2013-11-22 23:27:56 +01:00
Max Kellermann 87c8953e8e PcmResample: un-inline Resample24() 2013-11-22 23:24:40 +01:00
Max Kellermann 45d27a52f1 PcmUtils: add function PcmClampN() 2013-11-22 23:24:40 +01:00
Max Kellermann d22acc59c9 db/proxy: implement method GetUpdateStamp() 2013-11-22 00:45:27 +01:00
Max Kellermann c064e8d62f DatabasePlugin: add method GetUpdateStamp()
Refactor SimpleDatabase::GetLastModified() to be generic for all
plugins.  Remove the SimpleDatabase assumption from db_stats_print(),
allowing it to be implemented by all database plugins.
2013-11-22 00:35:29 +01:00
Max Kellermann 099a2cb586 Stats: print db statistics only if db is available
Fixes crash on "stats" in certain configurations.
2013-11-22 00:27:37 +01:00
Max Kellermann 042fe2a9d0 Stats: print more unsigned integers 2013-11-22 00:23:27 +01:00
Max Kellermann ff1c1107f3 Stats: auto-reload statistics with proxy plugin 2013-11-22 00:19:28 +01:00
Max Kellermann 41a3fd0fd0 Stats: use struct DatabaseStats
Eliminate redundant declaration.
2013-11-22 00:12:12 +01:00
Max Kellermann b9169a5670 Stats: move the GTimer variable out of struct stats 2013-11-22 00:10:53 +01:00
Max Kellermann 2ecd5fa28d Stats: don't export the global variable "stats"
Unused outside of Stats.cxx.
2013-11-22 00:08:43 +01:00
Max Kellermann e719b6cc41 Stats: print db_update as unsigned integer 2013-11-22 00:04:58 +01:00
Max Kellermann 67b8124a1d Mapper: _get_music_directory_utf8() may return nullptr
If no music_directory is configured, return nullptr instead of an
empty string.  This fixes a crash when db_file is configured without
music_directory.
2013-11-22 00:02:17 +01:00
Florian Schlichting 51ec499c89 system/ByteOrder: testing for endianness in a more general way
Fixes build tests on ia64 and mipsel by testing for endianness in a
more general / portable way.
2013-11-21 23:04:49 +01:00
Max Kellermann 3a4df25db2 util/ByteOrder: add comments 2013-11-21 23:04:31 +01:00
Max Kellermann 37cf78ef45 util/ByteOrder: indent the preprocessor directives
Improve readability.
2013-11-21 23:03:28 +01:00
Denis Krjuchkov 740d8ec5ab system/fd_util.h: avoid symbol conflict with statically linked libmpdclient 2013-11-18 16:35:22 +06:00
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 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 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 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