Commit Graph

1277 Commits

Author SHA1 Message Date
Max Kellermann 78728138a0 lib/upnp/Compat: disable the 1.8 API emulation with libupnp 1.6.24
libupnp 1.6.24 added a few badly designed macros which break the MPD
build:

 8177a4195a/

To work around this, we disable our emulation functions (from
714011c81e) on this libupnp version.

Closes #163
2017-12-02 14:47:27 +01:00
FlashSystems 63fc98591d Fix for "Mount-Points are purged from database on update/rescan."
Signed-off-by: FlashSystems <developer@flashsystems.de>
2017-11-27 22:34:49 +01:00
Max Kellermann 53def9a682 increment version number to 0.20.13 2017-11-27 22:32:55 +01:00
Max Kellermann 323231d1dd release v0.20.12 2017-11-25 19:32:37 +01:00
Max Kellermann 714011c81e lib/upnp: adapt to libupnp 1.8 API changes
Closes #155
2017-11-16 11:39:11 +01:00
Max Kellermann 014f8cd693 output/httpd: flush encoder after tag
Without the flush, ReadPage() may not return any data, or not all
data.  This may result in incomplete ddata the new "header" page,
corrupting streams with some encoders such as Vorbis.

Fixes #145
2017-11-14 12:00:14 +01:00
Max Kellermann aea37e46e3 encoder/vorbis: default to quality 3
Don't require a quality or bitrate setting.  If nothing is set, don't
fail startup - just go with a good default.  A quality setting of 3 is
what "oggenc" defaults to as well.
2017-11-14 11:30:28 +01:00
Max Kellermann 31ab78ae8e input/{cdio,ffmpeg,file,smbclient}: unlock the mutex during blocking I/O
InputStream::Read() and InputStream::Seek() are called with the mutex
locked.  That means the implementation must not block, or unlock the
mutex before calling into blocking code.

Previously, a slow CD drive could stall the whole MPD process,
including the main thread, due to this problem.

Closes #149
2017-11-13 17:13:10 +01:00
Max Kellermann a2b77c8813 decoder/ffmpeg, test/test_protocol: catch exceptions by reference
Work around -Werror=catch-value.
2017-11-12 18:54:29 +01:00
cathugger b111a8fe8d output/Thread: ensure pending tags are flushed in all cases
Fixes hanging playback with soxr resampler.

Closes #139, #141
2017-11-05 17:42:32 +01:00
Marcin Jurkowski 3b23cf0258 decoder/vorbis: scale and clip tremor-decoded samples to 15 bits
Tremor decoder is unusable since commit 2ee43c4. Sound is distorted to
the point where it's nothing but noise.

The data from vorbis_synthesis_pcmout() needs to be scaled and
clipped for 16 bit sample size. For reference see
http://lists.xiph.org/pipermail/tremor/2010-April/001642.html and
http://lists.xiph.org/pipermail/vorbis/2006-October/026513.html.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2017-11-03 19:45:41 +01:00
Max Kellermann 28e864e096 player/Thread: log message when decoder is too slow 2017-10-25 20:26:09 +02:00
Max Kellermann 1de19b921a input/curl: call StartRequest() after setting CURLOPT_RANGE
It's not possible to set CURL options after curl_easy_perform(), and
thus the CURLOPT_RANGE had no effect.
2017-10-24 21:43:39 +02:00
Max Kellermann 338e1f5926 increment version number to 0.20.12 2017-10-24 17:31:55 +02:00
Max Kellermann a7fdfa08e1 release v0.20.11 2017-10-18 10:14:46 +02:00
Max Kellermann 9703a401c5 Playlist{File,Save}: always use UTF-8 in playlists on Windows
Turns out that using CP_ACP is a lousy idea, because only very few
Unicode characters can be represented by it.  Instead, switch to UTF-8
(which every sane person on other operating system already uses).

Closes #102
2017-10-18 10:05:26 +02:00
Max Kellermann 91254e9211 queue/PlaylistControl: keep order list consistency in MoveOrderToCurrent()
Our previous use of Queue::SwapOrders() could cause surprising
results:

- sometimes, the old "current" song would be played again (if the
  newly selected song had not been played already)

- sometimes, the old "current" song would not be played again (if the
  newly selected song had already been played)

This is inconsistent, because it should not depend on whether the
newly selected song had already been played.

So instead of Queue::SwapOrders() we now use Queue::MoveOrderAfter()
and Queue::MoveOrderBefore(), which is more expensive, but also more
consistent.  It attempts to retain as much from the previous order
list as possible, and only moves the newly selected song around.
2017-10-18 09:05:47 +02:00
Max Kellermann fa67c2548a decoder/Thread: clear the command after catching an exception
If an early exception gets caught (e.g. from
AllocatedPath::FromUTF8Throw()) before
DecoderControl::CommandFinishedLocked() is called, the decoder thread
would go in an endless loop, because DecoderCommand::START is still
set.

Closes #118
2017-09-27 17:08:16 +02:00
John Regan ea80587ddb GME Plugin: fix track numbering
GME starts all track indexes at zero, but subtune prefixes
start at one. This fixes an off-by-one error during track
enumeration.
2017-09-27 11:18:03 +02:00
Max Kellermann 1295a1272a lib/icu/Compare: add fallback using strcasecmp() and strcasestr()
Our IcuCaseFold() fallback using strxfrm() is not actually case
insensitive.  This commit fixes the problem by switching to
strcasecmp().  That function is not guaranteed to support UTF-8, but
it's the best we can do in this sparse situation.

Closes #111
2017-09-20 23:43:27 +02:00
Charlie Waters b253a6b71e ffmpeg plugin: when decoded stream duration is unavailable, attempt fallback to container duration (fix MusicPlayerDaemon/MPD#110) 2017-09-18 10:39:27 +02:00
Max Kellermann f4f461b8bb storage/curl: support Content-Type application/xml 2017-09-01 11:32:40 +02:00
Max Kellermann f6abbc01bd increment version number to 0.20.11 2017-08-31 19:48:59 +02:00
Max Kellermann 57a71c157d release v0.20.10 2017-08-24 09:15:43 +02:00
Max Kellermann a00d412008 player/Thread: initialize play_audio_format, fixes assertion
This fixes an assertion failure caused by resuming playback before the
decoder has finished startup.
2017-08-23 17:43:49 +02:00
Matthew Leon 5fb39658f1 OSX mixer 2017-08-21 20:05:50 +01:00
Max Kellermann b0703b92c3 util/FormatString: pass the allocated buffer to AllocatedString::Donate()
.. and not the stack buffer.  This made the AllocatedString destructor
crash.

Closes #52
2017-08-03 00:25:30 +02:00
Max Kellermann dd9fd3d8a7 tag/Aiff: the FORM chunk size is big-endian
Was broken by commit 8a86460b8f

Closes #87
2017-07-31 13:46:09 +02:00
Matthew Leon 4c0404c70d Check for MusicBrainz id3v2 tags in ffmpeg.
Addresses #82.

Previously, the ffmpeg decoder only checked for the "generic"
MusicBrainz metadata keys used in other metadata container formats.
2017-07-20 08:28:14 +02:00
Max Kellermann 58a99f1907 increment version number to 0.20.10 2017-06-15 21:35:23 +02:00
Max Kellermann cf86dfd317 release v0.20.9 2017-06-04 12:51:36 +02:00
Max Kellermann 62b03cfddf storage, db, mixer, command: remove more bogus "pure" attributes
This commit is similar to 788e3b31e1,
and removes more "pure" attributes which were placed on functions that
could throw exceptions, which is illegal according to clang's
understanding of the attribute (but not according to GCC's).  GitHub
issue #58 was most likely about StorageDirectoryReader::GetInfo() and
Storage::GetInfo(), which still had "pure" attributes.

Closes #58
2017-06-03 21:54:24 +02:00
Jörg Raftopoulos 18b827b979 decoder/ffmpeg: add support for adx
Add ffmpeg decoder support for *.adx files (Sega game console)

Closes #60
2017-06-03 20:57:20 +02:00
Max Kellermann 0a379fc514 system/ByteOrder: fix byte order detection on FreeBSD/aarch64
Patch from
 https://svnweb.freebsd.org/ports/head/audio/musicpd/files/patch-src_system_ByteOrder.hxx?revision=441921&view=co
(with a tiny modification)

Closes #59
2017-05-29 20:37:14 +02:00
Max Kellermann 445c11b8d9 increment version number to 0.20.9 2017-05-29 20:36:08 +02:00
Max Kellermann 8d290ad509 release v0.20.8 2017-05-19 20:10:22 +02:00
Mario Di Raimondo ffa676f577 playlist/m3u: support for mime-type `audio-mpegurl` for M3U playlists 2017-05-19 15:25:58 +02:00
Max Kellermann 64786ec12a Main: omit "constexpr" on MIN_BUFFER_SIZE with GCC 4.x 2017-05-16 07:20:47 +02:00
Max Kellermann b3c82f8886 output/{osx,haiku,pulse,sles}: add missing "noexcept"
Fixes build failure on OS X, closes #44.  With the other plugins,
that's not critical, because those use the AudioOutputWrapper, which
hides this problem.
2017-05-16 07:12:30 +02:00
Max Kellermann 063259dc52 increment version number to 0.20.8 2017-05-16 07:06:57 +02:00
Max Kellermann b4c9d9c2a7 release v0.20.7 2017-05-15 22:51:08 +02:00
Max Kellermann fa2b59df4b Main: cap buffer_before_play at 80% to prevent deadlock
Closes #34
2017-05-15 22:49:31 +02:00
Max Kellermann f41a169460 Main: enforce a reasonable minimum audio_buffer_size setting 2017-05-15 22:44:18 +02:00
Max Kellermann 788e3b31e1 *: remove "pure" and "const" attributes from throwing functions
The "pure" and "const" attributes are not so well-defined, and a
recent clang version implements an optimization which pushes the
definition's boundary beyond what I believed it was.  clang now
assumes that functions declared "pure" cannot throw exceptions, even
if they lack the "noexcept" specification.

When compiled with this new clang version, MPD will crash randomly if
an exception happens to get thrown by such as "pure" function
(https://github.com/MusicPlayerDaemon/MPD/issues/41).

This commit removes all such misplaced "pure" and "const" attributes,
closing #41.
2017-05-08 17:25:06 +02:00
Max Kellermann 504f5f7bdd storage/FileInfo, db/simple/Directory: use 64 bit for device/inode
An ino_t is usually a 64 bit integer, and some file systems (such as
Linux's kernel NFS client) really uses the upper 32 bit.  This can
lead to false positives in the directory loop detection in
FindAncestorLoop().  Increasing these two attributes (in
StorageFileInfo and Directory) to 64 bit adds little overhead, but
makes the check a lot safer.
2017-04-06 09:58:25 +02:00
Max Kellermann 32bcad51b8 configure.ac: prepare for 0.20.7 2017-03-16 10:50:12 +01:00
Max Kellermann a40510c241 release v0.20.6 2017-03-10 16:57:59 +01:00
Max Kellermann ac8dce6599 lib/curl/Request: "ICY 200 OK" is a response boundary header 2017-03-10 16:28:02 +01:00
Max Kellermann 1b6666fa39 Partition: handle SYNC_WITH_PLAYER before TAG_MODIFIED
The TAG_MODIFIED handler (i.e. playlist::TagModified()) works only if
the modified song is the current song - something that is not updated
until SYNC_WITH_PLAYER is finished.  This fixes tag updates right
after a new song is started.
2017-03-10 16:11:34 +01:00
Max Kellermann 1dd01c99e8 decoder/sidplay: make compatible with libsidplayfp < 1.8
https://bugs.musicpd.org/view.php?id=4665
2017-03-10 13:48:52 +01:00