aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-11-08DecoderAPI: log without holding mutexMax Kellermann1-2/+2
2013-11-08PlayerThread: fix stuck MPD after song change (0.18.2 regression)Max Kellermann1-4/+8
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-08DecoderInternal: simplify need_chunks()Max Kellermann1-11/+4
Remove the "do_wait" parameter which is always true. Check only command==NONE and merge the "return" statements.
2013-11-08DecoderInternal: don't wake up player in need_chunksMax Kellermann1-1/+0
Nothing of interest happens here. No need to wake up the player.
2013-11-07input/cdio_paranoia: add setting "default_byte_order"Max Kellermann1-2/+26
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-07AvahiPoll: don't close the dbus socketMax Kellermann1-0/+4
Avoid closing it twice.
2013-11-07input/curl: unregister removed sockets from epollMax Kellermann1-1/+9
Fixes a crash bug. See code comment.
2013-11-06OutputControl: reduce the number of OutputThread wakeupsMax Kellermann4-2/+30
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-06PlayerThread: reduce the number of DecoderThread wakeupsMax Kellermann1-2/+14
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-06DecoderControl: reduce the number of PlayerThread wakeupsMax Kellermann3-4/+26
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-06DecoderInternal: lock DecoderControl in _flush_chunk()Max Kellermann2-0/+4
Must hold the Mutex to signal the Cond object safely.
2013-11-06DecoderInternal: wake up the player thread in _flush_chunk()Max Kellermann2-4/+2
Merge duplicate code.
2013-11-06event/FullyBufferedSocket: remove obsolete TODO commentMax Kellermann1-16/+0
We have a better solution now.
2013-11-06ClientRead: "close" flushes the output bufferMax Kellermann3-1/+12
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-06event/FullyBufferedSocket: try to write without extra roundtripMax Kellermann2-17/+33
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-06event/FullyBufferedSocket: make WriteFromBuffer() protectedMax Kellermann2-4/+4
.. and rename it to Flush().
2013-11-06PlayerThread: enable buffering when starting playbackMax Kellermann1-1/+1
For some reason, this got lost in commit 975deca8. Re-enabling this fixes stuttering at the beginning of radio streams.
2013-11-06input/curl: fix bug with redirected streamsMax Kellermann1-110/+138
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-06input/curl: move code into class CurlMultiMax Kellermann1-43/+66
Move all global variables there, and keep just one global variable: the pointer to the CurlMulti instance. Prepares for the next commit.
2013-11-06input/curl: remove the global list of requestsMax Kellermann1-13/+0
Unused.
2013-11-06input/curl: don't abort all requests on curl_multi_perform() errorMax Kellermann1-40/+7
Eliminate some complicated code that's not worth the trouble.
2013-11-06input/curl: use CURLOPT_PRIVATEMax Kellermann1-5/+7
Replaces the loop in input_curl_find_request().
2013-11-06event/SocketMonitor: add method Abandon()Max Kellermann4-2/+32
2013-11-05system/ByteOrder: fix big-endian supportMax Kellermann1-2/+2
D'oh!
2013-11-05playlist/pls: fix reversed song orderMax Kellermann1-1/+0
Remove the forward_list::reverse() call. It was not necessary, because pls_parser() already reads the playlist in reverse order.
2013-11-05decoder/dsf: enable DSD128Jurgen Kramer1-2/+2
2013-11-05add various missing headersNatanael Copa3-0/+3
Fixes building with gcc-4.8 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2013-11-04output/alsa: avoid endless loop in Raspberry Pi workaroundMax Kellermann1-1/+17
See code comment.
2013-11-04event/ServerSocket: don't abort if IPv6 is not availableMax Kellermann1-1/+19
First check if an IPv6 socket can be created.
2013-11-04Log: add level "DEFAULT"Max Kellermann14-45/+72
Map LogLevel::INFO to G_LOG_LEVEL_INFO, and LogLevel::DEFAULT to G_LOG_LEVEL_MESSAGE. Now client connect/disconnect message are only logged on log_level "secure".
2013-11-04Log: document the LogLevel itemsMax Kellermann1-0/+16
2013-11-04event/ServerSocket: fix assertion failureMax Kellermann1-1/+1
Regression from previous commit. D'oh!
2013-11-04event/ServerSocket: open sockets in the order they were configuredMax Kellermann2-5/+5
Use a std::list which can be appended at the end.
2013-11-04system/resolver: return path of UNIX domain socketsMax Kellermann1-7/+15
getnameinfo() doesn't work well - it always returns "localhost".
2013-11-04ClientRead: always ignore whitespace at the end of the lineMax Kellermann1-2/+7
2013-11-04filter/AutoConvert: modify child_audio_format, not in_audio_formatMax Kellermann1-2/+2
This prevented using the "volume_normalization" feature with some codecs (e.g. mp3), because the normalization code requires 16 bit samples. If the codec happens to deliver formats other than S16, the AutoConvert filter succeeds to initialize the conversion filter, but the returned input audio format was wrong.
2013-10-31CommandLine: simplified program name lineMax Kellermann1-1/+1
2013-10-30system/FatalError: use _exit() instead of exit()Max Kellermann1-2/+2
Skip the global destructors. We don't need them here - we bail out as quickly as we can.
2013-10-30system/FatalError: move code to Abort()Max Kellermann1-3/+10
2013-10-30*: update copyright year to 2013Max Kellermann116-116/+116
2013-10-30ClientList: disconnect all clients in destructorMax Kellermann1-0/+3
Fixes assertion failure.
2013-10-30mixer/software: fix double free bugMax Kellermann1-3/+15
2013-10-30PlaylistState: ignore "mixrampdelay:nan"Max Kellermann1-1/+7
mixramp_delay==nan() causes severe problems with cross-fading.
2013-10-30increase default buffer size to 4 MBMax Kellermann1-1/+1
2 MB was too small for cross-fading a 24 bit file. Increasing to 4 MB is still not too large for weak machines, but is enough for cross-fading.
2013-10-30db/proxy: remove obsolete #undefsMax Kellermann1-2/+0
2013-10-30db/proxy: auto-reconnectMax Kellermann1-14/+64
2013-10-30ReplayGainInfo: use large negative value instead of infinityMax Kellermann2-4/+4
The last piece to allow -ffast-math.
2013-10-30PlayerCommands: show CrossFade/MixRamp only if enabledMax Kellermann1-4/+10
2013-10-30PcmMix: use negative value instead of NaN for additionMax Kellermann3-7/+6
Avoid NaN to allow -ffast-math.
2013-10-30CrossFade: eliminate NaN from mixramp_interpolate()Max Kellermann1-4/+4
Use a boolean flag instead.