Commit Graph

1878 Commits

Author SHA1 Message Date
Jacob Vosmaer dca0519336 Clang: only use [[fallthrough]] in C++ files
It appears that [[fallthrough]] is valid in C++ but not in C. And
in some Clang versions (e.g. Clang 11 on macOS), Clang is pedantic
about this and considers it an error to use [[fallthrough]] in a
.c file such as src/util/format.c.

This changes makes gcc_fallthrough a no-op under Clang in C files.
2019-12-31 13:54:09 +01:00
Max Kellermann 32a17a997a increment version number to 0.21.19 2019-12-24 16:41:13 +01:00
Max Kellermann 803a48e96d release v0.21.18
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl4CKwwQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEp46D/9q1pRkhYzCyZPQGX967UPoV+Bc1YMX4o2U
 Uh/HqQrKKRAK9goaxu9yMKBIFCbzj6WEZou+/uMEf6ZwXuRcnJMobrUU4+G9Yu3r
 FzlQPW870DyOhk2PWHF8CW3oMt/YH05b6nYNo2ocRnX69/oqL1G7ukbF2Pz3TPc0
 0uNQYYERdMawNCEi1OarzziR6DKuiN+MtZRgUQVacAsoUirwWGNJuaGSDtc3MMM7
 YhgKVmd9XsgVr7fykArj6PLsm2iyXJP5nDB/tIqmwMpQFyhuLUnGOMfhCq02em+r
 47LGvmZiSS/9F2JzPU8EL2yzYdBe4QvU6Ol5SfXbom11MZc3Ty502g2jUXVHjCeo
 1FljCPHbarTmKhvUc0xQXA9i6exZ0wwtxL+Zv7ZQKquRPAhq8E07qkQpdaTWa6vn
 3RfilLE1B/GCgoT6D1+zABxdJ1HRLT7tzFob2kkCccxguK3j2JjCUIkSgM6IY0yv
 a6sMEXbqa+Lh8jggs9ksoT6O+T2HHEr3tEfpFHY+t0NFRfwHd9aX9bNjK+Ji0n51
 YBf2FCb2EBrMAWNZmEnq+TuKX0HASDtoAXTviRKqBXtEG5V8MdAt4PPICCb+bkDr
 psIuYcGeK3vofvq1SwEC7h7gCvsBK5w17/oE2/jYcZLo12H1IdHe5gMP3OUhjel5
 BRi6rLlkYw==
 =XXXs
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.18'

release v0.21.18
2019-12-24 16:31:06 +01:00
Max Kellermann bf41d1ad2b release v0.21.18 2019-12-24 16:13:16 +01:00
Max Kellermann 744bd1eadc time/ISO8601: refactor ParseTimeOfDay() to parse one by one
This prepares the migration away from strptime() for Windows
portability.

But the real reason I'm doing this is that strptime() on Apple is
buggy: strptime("14", "%H%M%S") (without separating colons) succeeds
even though only the hour has been parsed.  This fixes recent Travis
failures in the ParseISO8601() unit test.
2019-12-24 10:15:03 +01:00
Max Kellermann a714bdb0ce lib/curl: drop support for CURL versions older than 7.32.0
For simplicity, this commit removes a workaround for an old CURL bug.
2019-12-23 14:41:06 +01:00
Max Kellermann d01fb6730a storage/curl: move start call out of the constructor
This can cause request completion in the I/O thread before this
constructor returns, leaving the object in an abstract state, causing
a crash due to pure virtual method call.  We should not start the
request until this object is fully constructed.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/665
2019-12-23 13:37:58 +01:00
Max Kellermann 9a577f8060 event/MultiSocketMonitor: add workaround for /dev/null
The ALSA "null" driver opens /dev/null and returns the file handle
from snd_pcm_poll_descriptors(), but /dev/null cannot be used with
epoll, the epoll_ctl() system call returns -EPERM.  This means that
the ALSA output hangs, eventually freezing the whole MPD process.

This commit adds a workaround to the MultiSocketMonitor class which is
used by the ALSA output plugin.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/695
2019-12-22 12:08:44 +01:00
Max Kellermann dcbb9fe07c event/Loop: round timeout up to avoid unnecessary wakeups 2019-12-22 11:58:31 +01:00
Max Kellermann a8661b5931 increment version number to 0.21.18 2019-12-18 16:49:04 +01:00
Max Kellermann 683d5848f4 release v0.21.17
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl34Bg0QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEmOvD/4/gBb1kIOQduz+ZV79LHPGeqDoIJBm8VWg
 t9R1Mpt0flqC8+RcXFK/P0kUifBO5fu+a1DbHHijUvDNLYpUsCiXyxTpES9gGh54
 7djEeqi1suoLpMUt4zkUEHGTp2dGUTmyewE1TuF1sZi2xlPgOeWXEX7a0xWs4zdG
 WI4CojUSkQGVAI2XZ7xIKP1v368B9F6AbqTK4zkzjNbTCv5VfESGlxdde0NXqU2e
 /bjil1aT2kdcks3ddeT4llyGIUzn1PzOyA6LQvmVXLSAtz9Rr/hHA+qkR19a4CCt
 PXxE0xClhhmZglzPuES0sRqBbwG99dPzA1ajTOtielwMrlFx+OceRfUnfdgqpPqd
 HTkEzMGsQ2PMMbE8R9DF5GU8B9xAcnKMh2g3/9KGStbocGSFWahLRObkHEhC5uJu
 g5ncQio3o/AtlBirywn/lkd6CYRDvMheMVOTHtv4/ZN0hIONMXCb6u1SQfqnX7qb
 fRP2UP9VUpPI9MUfOn/0uqM8/zXb5SMRe78p9UIYCF+mEDST190VxsdMjiBp/Xug
 Pktlec72iyiNHCavp04nXkt2kBrfSIFFaAQ0Qlp4huRV1k3Ur672NHtwuPLv8ORH
 xLec8On6nWVuuu5kC0F+4KxTlu6u2CMwH+wVr7t/D4rrD1iVo39MtElTBawZZC6+
 8EapnNHyGg==
 =A+Dp
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.17'

release v0.21.17
2019-12-16 23:44:20 +01:00
Max Kellermann 5680a3a4b7 release v0.21.17 2019-12-16 23:32:44 +01:00
Max Kellermann 15ce8eb487 time/ISO8601: support omitting field separators
Closes https://github.com/MusicPlayerDaemon/MPD/issues/685
2019-12-16 23:31:29 +01:00
Max Kellermann b06825829b time/ISO8601: allow omitting the "Z" suffix
And allow "Z" suffix after date.
2019-12-16 23:24:43 +01:00
Max Kellermann ba4cd47fd8 time/ISO8601: allow omitting the time of day 2019-12-16 23:24:43 +01:00
Max Kellermann 32799ff682 archive/zzip: improve error reporting
Most importantly, this commit translates ZZIP_ENOENT to
std::system_error(ENOENT) so IsFileNotFound() returns true and
find_stream_art() can suppress the log line.
2019-12-04 12:33:42 +01:00
Max Kellermann 13ce07d181 output/shout: declare metadata as UTF-8
Apparently, Icecast defaults to ISO-8859-1 for MP3:

 http://icecast.org/docs/icecast-2.4.0/config-file.html#mountsettings

This change forces Icecast to UTF-8 without having to configure it in
Icecast's configuration file.
2019-11-06 16:05:22 +01:00
Max Kellermann 496f43e25d Merge branch 'v0.21.x' 2019-11-04 15:07:46 +01:00
Max Kellermann 129d8e89b9 lib/sqlite: disable if -Ddatabase=false
Fixes build failure in StickerCommands.cxx.
2019-11-04 14:10:03 +01:00
Niklas Haas 65778a3774 output/Jack: mark ports as terminal
This is the correct thing to do for ports from which a signal ultimately
"originates", such as is the case with mpd.
2019-10-29 10:07:44 +01:00
smutbert 4ecd4761c2 add tag "Conductor" 2019-10-25 10:12:32 +02:00
Max Kellermann 85d27cbcb9 increment version number to 0.21.17 2019-10-16 14:20:28 +02:00
Max Kellermann e1867a99e9 release v0.21.16
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl2m6cwQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEuMlD/9W6UTA9WfbeB2k8F2gFvy30w3jarsIdANG
 iRl2qW8a/MSp6zNj5t3rIH/JTOPEVXgB7c844gIC2VHkKAu4M3kV2sqa7cDEcq6o
 tFH5npemuCFbpkkAqXHpgFindWGMOqZy01PCN8m70y9IbfmI0Q25jngKeeuzgZ9O
 4DHw9IniWNamAi9H3MdGt6BpyuQ+EJ+FOfuJdsJkLgfK15qMn/3LwNoUyCxjyK/K
 brdQO0qpBg7dLZoGb6ER7qkyV1Cp+z/Mqeeocn4iQf3RuepIKzhZFMB1MY9FS7O1
 YAA89Lpk9mvLqx1/LkArrPEOv7k5Ia5KSmxZJ5dsrdXm/TKVM1k0MxZuE7LoXLXp
 wbdhXFoyhuL6lwLkw20wj1zqcTGMAYIp6t48YbDlVy59f/9OVROr++pCQsY+3L2t
 JPY90z6hf6yDF5yZCucSt7gin/WXRdeQLTgAxd8EqGqFgIRrW0GZhssg+7O1iGCq
 aSAVlxfzhVFxz7eyo4u3Dq/+d6gh3NRzV6exUYMxp3WHu7eweemlnKyxPxQ1lvSF
 5EkZXC56wQp0JIcIRYLEXkJN8lmIy/i0xHaOLDB7cJN23CC5Z68Up6peCzvVPp+E
 PIzOtT+4/FnQ6euu6KLHeiDyTWxdmGSrSP1W6cc/FpyLU86ZV/5tLg0bEaNxb9Sl
 lYfRth0D/A==
 =9Cv+
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.16'

release v0.21.16
2019-10-16 12:03:12 +02:00
Max Kellermann 9b95e65bd9 release v0.21.16 2019-10-16 11:58:36 +02:00
Max Kellermann 12a86c4975 queue/PlaylistEdit: fix relative destination offset when moving a range
Commit 13208bf5a7 added range support to
the `move` command, but applied the wrong offset to the `to` variable.
When the source range is before the current song, and the song thus
gets decremented by the range size, then the final destination offset
must also be decremented by the range size.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/663
2019-10-15 17:00:16 +02:00
Max Kellermann f0386459ee storage/curl: follow redirects for collections without trailing slash 2019-10-15 16:42:39 +02:00
Max Kellermann 56cc42b752 storage/curl: use MapUTF8() to reuse existing escaping code
Commit 29f78b18b1 continued.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/662
2019-10-15 16:26:53 +02:00
Max Kellermann c89c7f71a2 thread/Util: lower the real-time priority from 50 to 40
On linux-rt, kernel IRQ threads are configured with priority=50, and
this change configures MPD somewhat below that priority, leaving some
room for other programs to be configured in between.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/643
2019-10-09 14:40:02 +02:00
Andre Heider 96a9670c69 lib/icu: fix build with iconv() 2019-10-07 13:34:04 +02:00
Max Kellermann dcc5ce6792 storage/curl: request the "resourcetype" property to fix update
Without requesting the property, "good" WebDAV servers would not send
it, and so MPD could never recognize a directory, failing the database
update.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/660
2019-10-07 12:44:48 +02:00
Max Kellermann 23d08820a2 db/update/Walk: fix crash when music_directory is not a directory
Add a runtime sanity check to avoid the assertion failure.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/660
2019-10-07 12:24:25 +02:00
Max Kellermann b9b906ab20 increment version number to 0.21.16 2019-10-07 12:24:25 +02:00
Max Kellermann 0643b5abad release v0.21.15
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl2LvuAQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEg3VD/9uWiK11PPXfpAqOQgL63c1CS/6HJizwnox
 n0ns3T7eJJPXy06NTwuo5M8JeAIhuysEciHlJeGBf4NIGwGGHOL3nQv3FkWJlfeh
 UrIJq66gIzElZ62Jvq+7zkkfjm6A0tmQoAEoIPouus+A4RNwndpqsKSotZzLK0yY
 ACkJTxl8JJj+UbLzleDKSA+RxG817onGKl+urkvNDRdD7xs3VEUX6jhddVM1n3m+
 BqCaihuQZYXur45mYIwFI7H5JevRawnEX8L6tERW0cE8j5IhnnPjwYvMX+DcZoTe
 DgYuGkfPTfl31QufbbetTwWITjf4nrummYrAM/fKcNJcaqZFo4hs7m7N6p9c2ebm
 QCUG0On32Lvkq4/iLAxXIdoy38mPkarREB2XQebHa6j2XPFjxB01lXLGYJzPtqBu
 LCFRpR+ssWeZDQ3uP+fAzlgMXmB+owWa9NVqU5vlx97TCmXInOeim6tfq1T4keGW
 3VFLqM6VAw4QyhrbowU0xbvxvYkWrgpkYbM5NcfwI67xZGLsI5vnRzX05VgF6BFZ
 B7g+JIWjv+Mjm1ltsvC4OlJEcCXZb0BQWvwLHq0EGeEP/R9MWYX6BxlF1V8FWR2S
 bIL0qIqtZfuUI66irNn23ZCyN4DilMcZkS8f30321hB2GLputG8zZwCcjxy1a/ft
 1OoHXRfKNw==
 =uONC
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.15'

release v0.21.15
2019-09-25 21:27:31 +02:00
Max Kellermann 964804a4c2 release v0.21.15 2019-09-25 21:24:15 +02:00
Max Kellermann 92495d2b0b decoder/mpcdec: fix bogus ReplayGain values
Apparently, libmpcdec sets gain/peak variables to zero if they are not
present.  This clashes with our formula and results in bogus values
which cause noise during playback.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/640
2019-09-13 19:52:11 +02:00
Max Kellermann 5ef645df97 NEWS: add missing line for 818b7e0641 2019-09-08 12:54:16 +02:00
Max Kellermann 0da9c91af2 decoder/{dsf,dsdiff}: fix displayed bit rate
The formula did not consider the channel count.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/639
2019-09-08 12:45:05 +02:00
Max Kellermann d63e2c2641 db/update: scan CUE playlist contents
This commit adds a PlaylistPlugin attribute "as_folder" which for now
is only enabled in the "CUE" playlist plugin (which handles separate
"*.cue" files).  If a playlist with this flag set is being scanned
during database update, it will be parsed and its contents will be
added to the database.  This allows clients to inspect them like
directories and its contents will be searchable.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/39
2019-09-08 00:39:53 +02:00
Max Kellermann e70f40fac1 increment version number to 0.21.15 2019-08-22 11:40:17 +02:00
Max Kellermann e6600b8562 release v0.21.14
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl1dBToQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEhlID/4gcrbaegKpTkftGPLBGlSUc4W0qwSHbdiJ
 SuzK7sraSGUlLHHiBfqvFfE8tyEaLfsJarqiOdGgfiaW5QyapdwuU5s76nAN6jjY
 onEo2QK6vSbv4J/B1+Jv+NGCgVM3ZkPy91GhfTz8MEtJMaBmztFhnpxK60r9jYPG
 5EBsnVa6HhI7gniQAtOwE8SXYnn92Q4j72S8OuAbJ7Vwh0oqdIyXECqzcAE97Fk2
 TNX/YSLST3I7Chv2OBDb3vOegh9nFUyr0qeSYdi8vk2BBYcgX2xYOOBQCC3ta/nr
 NNeuSJOLgcF1XrFqVRRhDKZ8Y2inD6qVAXOH5WtChT1n3uXqYW7vdq0fW+/w3W/E
 vouzgt5KvU5Me4Mk2M2dMjEWW+7Y8EUjvrwDnbDIkyP+Yi+BLTmTnyBgAW3cvRO9
 UoCcWTBOEgyX2wAFl3r+NMPEneuMLbMCZUMju4/zveiRJdFExA0LC8wk0/iWqQbW
 +WD8y6RTo7Z1jsP1vnBimgAkzkLAOuMlKLYNI15ETrxwKWgOjN6a7Q61GVdsaiqG
 fKQeO0kZWWFcJ7HECgp3tpwWEi1+7/uqt0TwQgOKDdZHYL0Wb6Ur09KJS4b+eKIl
 UzYwCrPgUx1pcYR+rTbMxCNpWn2kA+vp2UaPBN60c/J98d+6C/2nKtIvXfr5MrUA
 CEb1epw/ew==
 =mEFF
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.14'

release v0.21.14
2019-08-21 10:52:49 +02:00
Max Kellermann bc89ca92b4 release v0.21.14 2019-08-21 10:47:53 +02:00
Max Kellermann 6c9f9c136b command/all: don't create new Response instance in exception handler
The new Response instance in the `catch` block didn't have the
`command` attribute set, so the error response didn't indicate which
command had failed, which however is required in the MPD protocol.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/628
2019-08-20 20:31:36 +02:00
Max Kellermann 44444e1b89 decoder/Thread: on late SEEK, start decoder at seek position
Previously, a bogus value (whatever happened to be still in
`start_time`) was used.
2019-08-20 20:15:08 +02:00
Max Kellermann ca450663d0 decoder/Control: work around crash after SEEK was too late
See code comment.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/629
2019-08-20 20:01:53 +02:00
Max Kellermann 26e0e1d25a time/ISO8601: allow omitting the "Z" suffix
And allow "Z" suffix after date.
2019-08-19 22:42:39 +02:00
Max Kellermann 6412efb6e4 time/ISO8601: allow omitting the time of day 2019-08-19 22:42:06 +02:00
Max Kellermann 92c89f0c86 playlist/flac: allow reading from FLAC streams 2019-08-15 11:13:39 +02:00
Max Kellermann e2da13b0d3 command/file: add command "readpicture"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/42
2019-08-13 11:55:51 +02:00
Max Kellermann 831bc711ca decoder/mad: remove option "gapless", always do gapless
Why would anybody want to keep the silence inserted by the codec?
Other plugins/codecs (such as Vorbis) have this hard-coded as well.
2019-08-12 13:05:57 +02:00
Fredrik Noring 9654a33218 decoder/sidplay: Fix empty album names by using the SID name field
SID files are generally collections of tunes, so a SID name field makes
sense as an MPD album. The SID tune information list (STIL) has name
and title fields for individual tunes, when such are known, but MPD is
currently not using the STIL.
2019-08-10 11:01:15 +02:00
Max Kellermann 9bcd02d178 Merge branch 'v0.21.x' 2019-08-10 10:58:32 +02:00
Fredrik Noring 2d61e526de decoder/sidplay: Fix date field to have year but not company or author
Field 2 is called <released>, formerly used as <copyright>[1][2]. It is
formatted <year><space><company or author or group>, where <year> may be
<YYYY>, <YYY?>, <YY??> or <YYYY-YY>, for example "1987", "199?", "19??"
or "1985-87". The <company or author or group> may be for example Rob
Hubbard. A full field may be for example "1987 Rob Hubbard".

This change splits the <released> field at the first <space>, to retain
the <year> part.

The 51823 SID files in High Voltage SID Collection (HVSC) version 71
have the following distribution of dates:

    333 19??         11 1990-92       6 1995-99       2 2006-08
    827 198?         88 1990-93    2140 1996        530 2007
     32 1982         69 1990-94       9 1996-97      15 2007-08
      1 1982-83      49 1990-95       2 1996-98       2 2007-09
    255 1983       3467 1991          5 1996-99       1 2007-10
    677 1984         75 1991-92    1840 1997        430 2008
    775 1985         65 1991-93       4 1997-98      23 2008-09
      3 1985-86      10 1991-94    1276 1998          1 2008-12
     10 1985-87      35 1991-97       4 1998-99     631 2009
    943 1986       3320 1992        865 1999          1 2009-10
     12 1986-87      26 1992-93      24 200?        645 2010
      5 1986-89      59 1992-94     590 2000          1 2010-12
   2083 1987          1 1992-96       4 2000-01     538 2011
     31 1987-88    2996 1993        727 2001          1 2011-12
     44 1987-89      42 1993-94     875 2002        651 2012
   2510 1988         12 1993-95       2 2002-04     811 2013
    129 1988-89       2 1993-97     844 2003        790 2014
     91 1988-90    2737 1994          3 2003-05     740 2015
     58 1988-91      16 1994-95     842 2004        792 2016
   3466 1989         20 1994-96       2 2004-05     775 2017
     95 1989-90      17 1994-97     707 2005        638 2018
    150 1989-91    2271 1995          1 2005-06     284 2019
   1077 199?          2 1995-96       2 2005-07
   2834 1990          4 1995-97     785 2006
    119 1990-91       2 1995-98       6 2006-07

References:

[1] https://www.hvsc.c64.org/download/C64Music/DOCUMENTS/SID_file_format.txt
[2] https://hvsc.c64.org/info
2019-08-10 10:50:51 +02:00
Fredrik Noring 7723c481db decoder/sidplay: Fix windows-1252 to utf-8 string conversion
High Voltage SID Collection (HVSC) metadata fields are encoded in
windows-1252, as described in DOCUMENTS/SID_file_format.txt:

https://www.hvsc.c64.org/download/C64Music/DOCUMENTS/SID_file_format.txt

If utf-8 transcoding fails, or the ICU library is unavailable, fall
back to plain ASCII and replace other characters with '?'.
2019-08-10 10:45:02 +02:00
Max Kellermann cf9ee33928 input/icy: support "charset" parameter in URI fragment
Closes https://github.com/MusicPlayerDaemon/MPD/issues/616
2019-08-10 10:07:13 +02:00
Fredrik Noring 0ed10542cc decoder/sidplay: Fix song length initialisation during container scan
The song length was previously undetermined.
2019-08-09 15:39:36 +02:00
Max Kellermann ab830f9afd increment version number to 0.21.14 2019-08-09 15:38:01 +02:00
Max Kellermann 349a2ea7eb Merge branch 'sid-genre-option' of git://github.com/frno7/MPD 2019-08-09 14:45:41 +02:00
Max Kellermann 192ad91010 release v0.21.13
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl1JSe4QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEq5gEACNRnk8lADXzerHiuhyySJTpo1hweh+tRpx
 fEahsC1SWa5677SsvHtk+Er8HTrpr0mSCefBbfqAKBSsJzdm1TUepCbEZrKM3jF5
 0PaRiKlOQraqLnT95AOVbdzKK0N2aKvf3aJfDkquG93YfMyJJr0oTGFfQNTT4VFC
 +HuvcqlMragXfLD2xp9WxhjYTajDmCobeBlHKND7FD67VyQqWIwWsRMKZKXXeplS
 kQlFSNLfb4L6x7Qvnz57wMSYHQ1yzjZKoEczjR5WEJBz4GYsw+8BB6M5TR+cyo+y
 LjiEMYMk1b+YiIneuloRaeCS/5PxMBeCSC+w6uqfnm9wGA5dv6zAWwHWJ6XqIYTv
 ORAxoWJ1oN3HAv7ao57g2kGJ5WZwrfVyiS0hViPM0D181w6dMvPgmWdltPZphxtY
 3uNurG45lecXoTtuv4EqWeeVOBzoJI1dUyQ7e73a9+Cpl9u7suAoe/nm3F/nh5ti
 l+I5VeK82GVBePXn02ZRAhkZ+Ll3jvt5Bpz/wyNutP6pWtFjYS6p1W19Hi2UiNOv
 56+ackJFr4oCqOoCKWHbwJbyrx44nhnBxiyEOhGdVA9xdB2EpYKOoZ29iGKEO2um
 +QytEt8gf6YVe3C51OlmJfnZoJ4+pwIWpQFyjT40CMy6ZL0swdLlMgFv5+LSjzrC
 eKJz2/h4dg==
 =ICvW
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.13'

release v0.21.13
2019-08-06 11:39:25 +02:00
Max Kellermann d4d2bc072e release v0.21.13 2019-08-06 11:35:42 +02:00
Max Kellermann bcccc8f66c output/jack: use jack_free() for Windows compatibility 2019-08-06 11:34:56 +02:00
Max Kellermann 3ef043392c input/cdio_paranoia: drop support for libcdio-paranoia older than 10.2+0.93+1
Version 10.2+0.93+1 was released five years ago in 2014 and is the
first version to feature cdio_cddap_free_messages().  There is no way
to check the libcdio-paranoia version at compile time, so let's just
remove support for older versions instead of attempting to fix the
cdio_cddap_free_messages() check at build time.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/613
2019-08-06 11:09:36 +02:00
Max Kellermann 864d6f312d Revert "decoder/mad: use MAD_F_MIN and MAD_F_MAX"
This reverts commit f7ed7446ae.  It was
a bad idea, because MAD_F_MIN and MAD_F_MAX do not represent the
clamping limits, but the theoretical minimum and maximum values of the
mad_fixed_t data type.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/617
2019-08-05 13:07:41 +02:00
Max Kellermann f44c67de09 increment version number to 0.21.13 2019-08-05 13:05:54 +02:00
Max Kellermann d146bef740 output/jack: use jack_on_info_shutdown() 2019-08-04 20:25:13 +02:00
ckdo d305f187d5 Add the ability to specify media.role for pulse output plugin
This is useful in multiple mpd instances scenario, or multiple pulse outputs defined on the same mpd instance.
It is actually a more flexible way to route flows than the "sink" parameter, letting the PulseAudio routing do its job, but with the ability to isolate routing for each output.

If not specified, the role remains like it was before this commit, ie "music"
2019-08-03 13:03:05 +02:00
Richard Dodd 4f6a713b32 Add option to not connect jack ports automatically 2019-08-03 13:01:47 +02:00
Max Kellermann 8f981845dc switch to C++17
Time to move on, two years after 2017.
2019-08-03 12:57:56 +02:00
Max Kellermann a90685d6cf release v0.21.12
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl1FZnQQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEjrXD/0QChgJtx6sVPRpMK7KszwgpmxNkhDPA13l
 puuYTg0eEZe9EJxNM82ouCNn2kOx9OjP5DKyeus0Dt4Pk5Cwj8HGeHqjTahtwHtD
 jbVy5kiEZ57NjBoLFoQBI6vMuzcz/DKStq2HmPJ62NQCIqbiTQXPpWvDYAieTFV+
 lbM7vc7VQ6A3bhms//vYMZYmQV7T4Eam3iEVxoQhX4Pd+wWXv+XcTfdI2UTUFWIY
 mt7+AZlG2ynev+zszUtDLB4aFEbRcLUBlSKuPv3j5ox7BjleLJXltpVbisI+TDHL
 nAyb2LtOTeVPpAaqiPeCju2ucWaUOsFkHmSCjPu8BHc8b4mLATiozv2BzY1qe5rX
 G7DZxCLq3IBtY4u4FpR4kOuVcjTGFKCToHGl8N6GrPmfa3n+MqPLAqKx32tSq+r/
 po2kbB9t0IXXT1njGWLb9W6y7z/7dsvy3YgjV6L7SfY/SA9MZELx+MBED2GSDYr9
 eWLK7LDO5soBUZvnDVJZO/a1oP0n5WiSV9n2/YGgRJXcljW8tJ8C76yMNziPK7yn
 Fjmc12o6kf5Afo3dNsLAdXH4p/8LeYK9IcJZmGfwBCccMHlnX+ySLfBOyuyUDD7g
 nOV/o7av/HZzirQ9h2CGUZhBPbPARjvMI+mhDVGxUx3OYxW9UfokmMVEs4h21f0R
 4XRbOUejVA==
 =hzQJ
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.12'

release v0.21.12
2019-08-03 12:53:23 +02:00
Max Kellermann ae19bda1f2 release v0.21.12 2019-08-03 12:48:20 +02:00
Max Kellermann f2d8fd769d player/Thread: don't restart unseekable song after failed seek attempt
The check IsSeekableCurrentSong() was added by commit
44b200240f in version 0.20.19, but it
caused a regression: by doing the branch only if the current song is
seekable, the player would restart the current song if it was not
seekable, and later the initial seek would fail; but we already know
it's not seekable, and so we should fail early.
2019-08-03 12:30:10 +02:00
Max Kellermann 952c793235 decoder/mad: subtract libmad decoder delay from LAME encoder padding
Apparently, libmad not only inserts 529 samples of silence at the
beginning of the file, but also removes them at the end.

This solves the last piece of
https://github.com/MusicPlayerDaemon/MPD/issues/601

Closes https://github.com/MusicPlayerDaemon/MPD/issues/601
2019-08-03 08:35:00 +02:00
Max Kellermann a0a74951b8 decoder/mad: eliminate attribute "bit_rate"
This also fixes a bug which caused the bit rate to not update after
seeking.
2019-08-03 00:38:45 +02:00
Diomendius b81138bda1 Fix JACK plugin outputting only to left channel
The JACK output plugin would not correctly upmix mono input files when exactly 2 output ports were configured. This fixes that.
2019-08-02 15:52:20 +02:00
Max Kellermann 6de088140b lib/xiph/OggVisitor: invoke OnOggPacket() with the "E_O_S" packet
The "end of stream" packet is not special; it contains normal data,
and thus we should pass it to OnOggPacket().

This fixes one part of https://github.com/MusicPlayerDaemon/MPD/issues/601
2019-08-02 14:04:08 +02:00
Max Kellermann af99f9fc90 pcm/Volume: convert S16 to S24 to preserve quality and reduce noise
Applying software volume to S16 samples means several bits of
precision are lost; at 25% volume, two bits are lost.  Additionally,
dithering adds some noise.

The problem gets worse when you apply the software volume code twice:
for the software mixer volume, and again for the replay gain.  This
loses some more precision and adds even more dithering noise, which
can become audible (see
https://github.com/MusicPlayerDaemon/MPD/issues/542).

By converting everything to 24 bit, we need to shift only two bits to
the right instead of ten, losing nearly no precision, and dithering is
not needed.  Even if the output device is unable to play S24 directly,
we can convert back to S16 with only one stage of dithering.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/542
2019-07-30 20:03:37 +02:00
Max Kellermann 991bbea875 Merge branch 'v0.21.x' 2019-07-29 11:32:00 +02:00
Max Kellermann b955334882 decoder/opus: ignore case in replay gain tag names
Closes https://github.com/MusicPlayerDaemon/MPD/issues/604
2019-07-29 10:40:37 +02:00
Max Kellermann 90ea3bf985 playlist/Song: support backslash in relative URIs
Closes https://github.com/MusicPlayerDaemon/MPD/issues/607
2019-07-29 09:58:53 +02:00
Max Kellermann 39b302dcad increment version number to 0.21.12 2019-07-12 17:22:20 +02:00
Max Kellermann 557098644b release v0.21.11
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl0cqqwQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFErtoD/0Qmma/ltv/D7+m+ZugDLUejxJ/SGEPJNVS
 To2yy87TqwcgRcmrlwp05epxxqm54LmE8z3748iIS76zBySc4lA8OHWCNCNs0lrc
 gbUOmUM9ZE89oXppEfjLlqIofSJVLw8rY+8RMtybKeKaJ3/4JlDySMw92UuZ3LMJ
 woqAZPUOPGYsT1KBjblWsRYkn5broOZ3m2zt6e5r09ICudKQjvS6gXT3wmNqmDEU
 cos2taYNGyi42ywVJzeAPVOO/MecS+WXZIIR0y5TvslDhKkTHIo2SS1qcNM2tCdg
 c5s+vQUtZkFmKK3fr4H861cWQelRbBFY4Fy/Shrz2FMZj7eUExH/eXaxX8I7S8tX
 f0H2y944AXwlFJrIQylnSgx4x9E+ye/Mqc8O4hmSA9KHfrWDWegcbB5S2v6zt1e9
 BmiWClH5Ts1beNmT5F9nExFLZjQzxwFTsm44HJhOK+poULRo+WQLllcAsCRjNw8s
 7EzPF/UmBcydeyWYmoPhXiexAFaIDx9B+n2SlgekdvxeneXHZMskkpyysLNVde3o
 1jXH0dBdm8rj8Xp2zm9t5yjnCy2iKPO5oVdZ+keTM9olG3Er+ar5ofT78n0xbEFW
 h7PikktbqWYeF01QjfSsHO7bhOVkvLtMNLZG1gtBGMI5qUWdnC/2HbTZWRHVeAKe
 wFxdx2MBwg==
 =4kRo
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.11'

release v0.21.11
2019-07-03 15:36:45 +02:00
Max Kellermann f6125f0c35 release v0.21.11 2019-07-03 15:16:27 +02:00
Max Kellermann f780ac418a output/alsa: log when generating silence due to slow decoder
MPD used to do that when this code lived in the player thread, but it
was removed by commit 98a7c62d7a4f716d90af6d78e18d1a3b10bc54b3; and
the replacement code in the ALSA output plugin didn't have it.
2019-06-28 18:15:30 +02:00
Max Kellermann 61a72a5d13 output/alsa: schedule a timer to generate silence
Without this timer, DispatchSockets() may disable the
MultiSocketMonitor and if Play() doesn't get called soon, it never
gets a chance to generate silence.  However if Play() gets called,
generating silence isn't necessary anymore...

Resulting from this misdesign (added by commit ccafe3f3cf in 0.21.3),
the silence generator didn't work reliably.
2019-06-28 18:04:49 +02:00
Max Kellermann 30ca6b8881 Merge branch 'v0.21.x' 2019-06-28 09:28:04 +02:00
Max Kellermann c926021599 output/alsa: always redo DrainInternal() after writing
Draining isn't finished just because the period_buffer has run empty.
It is only finished after snd_pcm_drain() has succeeded.
2019-06-28 09:10:16 +02:00
Max Kellermann 543776d9c9 output/alsa: check PCM state before calling snd_pcm_drain()
Apparently, if snd_pcm_drain() returns EAGAIN, it does not actually
want to be called again; the next call will snd_pcm_drain() will also
return EAGAIN, forever, even though the PCM state has meanwhile
switched to SND_PCM_STATE_SETUP.  This causes a busy loop; to fix
this, we should always check snd_pcm_state() to see if draining is
really required.
2019-06-28 08:55:25 +02:00
Max Kellermann 01fd6e5e82 Merge branch 'v0.21.x' 2019-06-27 14:51:05 +02:00
Max Kellermann 8bf3f9b874 input/tidal: deprecated because Tidal has changed the protocol
See https://github.com/MusicPlayerDaemon/MPD/issues/545
2019-06-26 23:14:07 +02:00
Max Kellermann ea639269d8 decoder/wildmidi: throw PluginUnavailable on WildMidi_Init() error
Closes https://github.com/MusicPlayerDaemon/MPD/issues/589
2019-06-26 22:40:27 +02:00
Max Kellermann ca8451cdbc tag/Type: add tag "Work"
Closes https://github.com/MusicPlayerDaemon/MPD/issues/577
2019-06-17 22:40:36 +02:00
Max Kellermann 33f5e03e80 Merge branch 'v0.21.x' 2019-06-17 22:06:54 +02:00
Max Kellermann 2c3eeb7194 MusicChunk: pad MusicChunkInfo to a multiple of 8 bytes
Workaround for a regression caused by commit
a06bf388d9, revealing a problem with
discarding odd numer of frames in the DSD_U32 and DoP converters,
causing distortions with DSD_U32 and DoP on 32 bit CPUs.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/469
2019-06-17 21:24:32 +02:00
Max Kellermann 1eae9339f2 db/Interface: CollectUniqueTags() allows multiple "groups"
Instead of passing tag and group, pass an array of tags.  To support a
nested return value, return a nested std::map of std::maps.  Each key
specifies the tag value, and each value may be another nesting level.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/408
2019-06-16 10:39:29 +02:00
Max Kellermann 09884e608b increment version number to 0.21.11 2019-06-11 09:29:05 +02:00
Max Kellermann adffbba2a5 release v0.21.10
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlz4JuAQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEq9nD/40/ryDwvgsQnKhYcpPhlV8bf8iTOUSPsrW
 2P5m48sfGb3LBHV+U/sHLWH8svODSxloyvyxYSUOEJyqOu42lj0BnxPBDvRwTjcq
 PxJPHHKVuExys04k4SOKIEci742WEHTVRzO8EeOvIdgkjXCak7tpQk/wmhrGfHF1
 +rLfSu6jq90/tELsOyTLGmk3KapY637Qf2Q99Z6VZnAXhIRLK4O1E8oKGOjl2h8I
 xvjZckVZV1FYeNrC0OYdNQX0A+JhkFwLFAeWP3ksBmKfs+Csf8X0JTCofnYph46t
 5SmhTd9I6NEVnNoZyOplV7QVawGPK1p69ORB052d/9QUhMqcPmwnHrhcrWtrYl5I
 6QtUwf8nJz/TnUc7/a3BBIPHLB/PD0fGsmdDoElikkPz76sGYNor+UZIdQke1HQL
 m3zmNDxjU++sRfrSjAPOK2mxD0Km8tYIcrQBMZcyxoc7GCHaw1pIa2cxxs1aB5QZ
 gFxYICL7LJ+g5Q19JhTiWlwfdOS7jGH7mVUjhLDA/mcxGf6ln6FkDx58GqPJV+es
 UcWVbOjb3T448TVNH0Jj+FrtWK5uBmOFNTk102BbTnfDT8muedbRmRCxn0NyKkFQ
 dS8/FdU7ffw2II49ZI6BfmeLucfoTwuQ1Ky297K/62NrM67/1dKKkBLAE3/aGxwh
 xzIDTT3Mkg==
 =SELi
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.10'

release v0.21.10
2019-06-05 22:38:54 +02:00
Max Kellermann e239009295 release v0.21.10 2019-06-05 22:32:32 +02:00
Max Kellermann 3fae2150f5 decoder/OpusReader: return StringView
Since we now don't duplicate all items, we can easily remove the 64kB
limit from OpusReader::ReadString() and instead silently ignore and
skip all strings which are longer than 4 kB.

This fixes a tag duplication bug with Opus file containing a very long
`METADATA_BLOCK_PICTURE` tag, which occurred because the Opus plugin
returned false after parsing all tags, and then the MPD core fell back
to FFmpeg which scanned the tags again.
2019-06-05 22:19:35 +02:00
cathugger f9ca2f52c1 output/httpd: reject some well-known request paths
Return `404 not found` for some common well-known paths, as clients requesting them usually do that automatically and don't expect endless audio stram.

Closes #572
2019-06-05 21:53:46 +02:00
Max Kellermann 2f83ed90d0 archive/iso9660: implement seeking 2019-05-31 18:40:24 +02:00
Max Kellermann 81b2b4a85c Merge branch 'v0.21.x' 2019-05-31 17:27:20 +02:00
Max Kellermann 304d45b551 Revert "player/Thread: remove unnecessary "pipe" check"
This reverts commit ff3e2c0514.  The
check was necessary, after all, because this is what checked whether
the decoder had finished the current or the next song.

> The "queued" flag can only possibly be set if the decoder is still
> decoding the current song or if the decoder is stopped.

That was wrong because ProcessCommand() sets `queued=true` and also
starts the decoder (if it was idle).

> This is also what the following assert() checks.

That was also wrong, because the assert() has two conditions.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/566
2019-05-31 17:23:12 +02:00
Max Kellermann 03507037e8 increment version number to 0.21.10 2019-05-31 16:16:56 +02:00
Max Kellermann 319c9699fb tag/Type: add TAG_GROUPING
Map ID3 "TIT1" to this new core tag type.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/563
2019-05-21 22:23:06 +02:00
Max Kellermann 8942be858b release v0.21.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlziw4IQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEqrmD/4ipjXE5PkGD7unTIvnmv0X1FRnaOO1rwyY
 SkqWl2D8DsgFh1d0IkNxzofNQ5mv3YpZY2ycD4kHbM+RWkV+fVuGnhePSCSd0w2s
 Lj5r8yYq43UfIwn4fVwFeqjsEhtT47gHLATJ4/Zc4q+VfzVhPqp1esxrf+vHX6nH
 SCMp9WP5L8FBcf28IqW3hBc/cOTtp36FsuzRkyFMrM/tq6a6VF8mqBKO9Qpnz6OU
 egq3d+tqpg1Qq90QXZx7LfXArK0v89Wezv3M/EhzamBc2DClFQnaL3BTOD0hawdt
 WRfm8WzdXS73QrmJvcOFtcath6jdrKIvBwMKIdmDikp2ofF0m1COh9UcHReA0MK9
 UbRZWmeTzeu+UKNugD//Ma+oNwntv5W/xSSvEsgvLTiyd8XcdlKXcsrwbYVD7o3L
 uTKq8V2h5iDC5cure5FvWnpaugaI38fJ+DDGArSe/BhScQhioXAPFa3hSGLux3e8
 gaKWu6/6biCi8yMra8z4dL2zyUNLEw4J2e9RPweLeQL/gi0A1alSLtcQ6VWGGFFW
 5GtQALTuISH5/9TWnr1LGiI6cgNHCQ2JOeL99pChu+PdoSiuA+KwQojZ4UEUVAGL
 GTbupl3yUFJ9jv/rLZOjOIycJ9cYifM+Th98iTfK4aMQujzAkJj132Qqzci+rUXp
 6R9hfalT2A==
 =aixT
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.9'

release v0.21.9
2019-05-20 17:23:01 +02:00
Max Kellermann 66a8fac25e release v0.21.9 2019-05-20 17:10:58 +02:00
Max Kellermann 923e66738c player/Thread: fix "single" mode race condition
If the decoder finishes decoding the current song between the two
IsIdle() checks, MPD stops playback instead of starting the decoder
for the next song.

This is usually not visible problem, because the main thread restarts
it via playlist::ResumePlayback(), but that way it, ignores "single"
mode.

As a workaround, this commit adds another "queued" check which
re-enters the player loop and checks again whether to start the
decoder.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/556
2019-05-20 16:22:01 +02:00
Max Kellermann 604d08b2c6 Merge branch 'v0.21.x' 2019-05-16 21:26:45 +02:00
Max Kellermann ca06d9d3bf input/buffered: fix deadlock bug 2019-05-16 21:11:03 +02:00
Max Kellermann bc5d4f9494 Merge branch 'v0.21.x' 2019-05-04 13:29:17 +02:00
Max Kellermann 65df6ca14e android/Settings: request READ_EXTERNAL_STORAGE permission
Using this API function requires SDK level 23.
2019-05-04 07:29:41 +02:00
Max Kellermann 36dec47bf7 android/build.py: link ARMv7 binary with libunwind
Fixes nullptr dereference when an exception gets thrown because there
is no ".eh_frame" section for unwinding.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/543
2019-05-03 20:15:50 +02:00
Max Kellermann 478cedcadf increment version number to 0.21.9 2019-05-03 20:15:33 +02:00
Max Kellermann 5b74ed6b3b release v0.21.8
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAly/BoIQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnxpEACRVQulwjs3jo/+rxJYXTjDBmPuvNGywaAf
 aAtEWTLWHYHSBRAGO2IVjtUOYJOrl2G1teA1rkSc2TqAMc12RYJPWm4q3Kamj7Tg
 2COKt81v1XcaR1uR0LI1D6V2SqguhSTrEc21VyMPhfFQDjcdlPTITzyOw1n/EP7j
 XwXyw6hDr2w+Ox4Ja6J7Cp61yWJAIYNtlRrDy7VRYtTvHtFJWdQu1955UTmn07LJ
 y0Ba4azE5FveEsbq+mrKzPKAJ6pYqdbeAqUEl+FMTJEb4jXVwmuAU9HI7i9ZP4mM
 k42hG1cco+2r5t7KsuakcgbdAyZflfdQBUcAywcyd5SdzUdFRbBt/c+/xKKLBms9
 7u8dAug8eSl9/QWHDQzQPPxxkX37R6p/P+Xg1CsTBksTHDK5jwMWrDicGzZYEBFC
 rA6eURfrjc4FN+qi0YWnLdXwJfUlVyINzz+fLgmzuN5L35qL/0WsyR/ztizPcoul
 przhUZ1nhmeFiItfS/5VkLXaECAWmhOYw/IpaCmOtK/ieIo6FXxk11GBP/RQ/SyT
 noPbqcnI2Nwgc2zTtCp2sLu1O3S2CeW7Ce4wKgiZOS4jJmKHDVRSli39t8eL146C
 dHxw0RMBPeZsn4Qh9yrfuMfsCySX1lr5uaokJ68LuQVToryIuT1mNUQdmWAdkceu
 eliH8Tfjeg==
 =BjVR
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.8'

release v0.21.8
2019-04-23 14:41:08 +02:00
Max Kellermann cabcbb059d release v0.21.8 2019-04-23 14:35:14 +02:00
Max Kellermann 5e21b2db3c doc/protocol.rst: "list file" is deprecated
Closes https://github.com/MusicPlayerDaemon/MPD/issues/526
2019-04-23 14:29:42 +02:00
Max Kellermann 3a0d6d96c1 input/smbclient: wrap in MaybeBufferedInputStream
This enables the input buffer for remote files and caches file
contents in MPD.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/376
2019-04-23 14:08:27 +02:00
Max Kellermann ccc58f2a32 Merge branch 'v0.21.x' 2019-04-18 11:49:05 +02:00
Max Kellermann ead3dc6a92 LocateUri: pass URI plugin kind, optionally disables plugin verify
Commit b3a458338a added a LocateUri()
call to several playlist commands, which applied InputPlugin URI
scheme verification to playlist URIs.  This broke the SoundCloud
playlist plugin which uses "soundcloud://" URIs for which no input
plugin exists.

This commit allows the caller to specify the kind of plugin which
shall be used to verify the URI.  Right now, only "input" is
implemented; "storage" uses the "input" verification for now; and
"playlist" has no verification at all (for now).

Closes https://github.com/MusicPlayerDaemon/MPD/issues/528
2019-04-18 10:03:15 +02:00
Eugene Gorodinsky 8d18b4c24b Fix meson.build to work properly with '-Ddatabase=false' 2019-04-18 08:55:13 +02:00
Max Kellermann 791245dec2 Merge branch 'v0.21.x' 2019-04-10 16:38:51 +02:00
Max Kellermann fe8621906d systemd: add user socket unit
Copy the system socket unit to the "user" directory.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/530
2019-04-10 16:37:13 +02:00
Max Kellermann ea5e6d8f33 Merge branch 'v0.21.x' 2019-04-04 10:29:58 +02:00
Max Kellermann f6941f9a44 event/SocketMonitor: don't cancel if OnSocketReady() returns false
Expect OnSocketReady() to cancel events.  If it returns false, the
SocketMonitor may be destructed already.  This fixes a use-after-free
bug in the "httpd" output plugin.
2019-04-04 10:24:58 +02:00
Max Kellermann df33a898d7 zeroconf/Bonjour: fix OnSocketReady() return value
Keep the SocketMonitor registered.  This wrong return value was added
6 years ago in commit 72cf8dd8a0, andd
apparently, nobody ever noticed.
2019-04-04 10:24:29 +02:00
Max Kellermann 380656d8c9 output/httpd: add missing mutex lock 2019-04-03 22:53:03 +02:00
Max Kellermann 37b54179d8 net/IPv[46]Address: add cast to void* to fix GCC9 build failure
Fixes:

 src/net/IPv4Address.hxx: In member function 'constexpr IPv4Address::operator SocketAddress() const':
 src/net/IPv4Address.hxx:171:24: error: a reinterpret_cast is not a constant expression
   171 |   return SocketAddress((const struct sockaddr *)&address,
       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 src/net/IPv6Address.hxx: In member function 'constexpr IPv6Address::operator SocketAddress() const':
 src/net/IPv6Address.hxx:138:24: error: a reinterpret_cast is not a constant expression
   138 |   return SocketAddress((const struct sockaddr *)&address,
       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Closes https://github.com/MusicPlayerDaemon/MPD/issues/522
2019-04-03 16:59:53 +02:00
Max Kellermann 7a1b56fe96 release v0.21.7
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlykiHUQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFErFWEACP0T0em6pKOV9W2YHivtnJoBhb3wG46a2w
 rnyNuj0FM8nhMsWunvqbOExogGxZziTKYhSdvzOBwNSleG1Eyjks8yNuPpp7nHH/
 Y5gyRr1o6BR4hkukWDAIBWN/iXatUWHb/itInN0KhrqyU0YptNGbOF87vLfAZlqW
 MNVTXO4YAx/tYHEt/4ze/ljtrNvXsB8Zw86cNI+jrivdujdKVfiN5dUpbc5Hj8DA
 3i6Y5YFm4OvHbFENeMy/kVht8Ln0/3Ak+Z9L7ti9ZSWLbOaQc7+Nl0P/3pfftzWf
 YK6DsRyvJ2dEPylAXqRIkZWdIU1VwjKc7cKYJFljNAMhaUWcrefXIGQOv0+1kbqz
 CxLgk3hIK3R7lGbxLXDU7xD05hbOGgXe1BKO9alGhEsyB8+sT6qfVay/RlJPN+da
 mSnslSzPyS+p9ZdyDnWXq68FS8BIriajDVXP7/WNMKz9OEe5BiXBBQVDM5/XbxQU
 qPxLn/BVYzDXOw8msgyIZ/vqE1rpomJDILsK/EMJ/HLAOdR/Jo10wIAGAqiLPp2j
 n2R9jS7nxZKmEvcZkg/HroNiGSpT89f38bbW/MCdzxAkg4vQDxQ0OE9GoeBi3oiP
 g/SkM/sJ9UdlC3bq7TAhxK0huimAEg5Rh6Z1II00D89QmWFQT0hjmxo++9WwCQXw
 CkIiKRf7Ug==
 =KzqS
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.7'

release v0.21.7
2019-04-03 12:32:20 +02:00
Max Kellermann 511826763a increment version number to 0.21.8 2019-04-03 12:27:18 +02:00
Max Kellermann ef10354d06 release v0.21.7 2019-04-03 12:18:29 +02:00
Max Kellermann 976731ab6c command/playlist: invoke the RemoteTagScanner on all newly added songs
Closes https://github.com/MusicPlayerDaemon/MPD/issues/234
2019-03-29 17:01:31 +01:00
François Revol 37a0f04712 Haiku: add version info to the resources like win32 does 2019-03-29 14:33:27 +01:00
François Revol 9d0bf5e95c Haiku: fix build 2019-03-29 14:32:06 +01:00
Max Kellermann b1b630a4cc command/database: support "sort" and "window" in more commands
Closes https://github.com/MusicPlayerDaemon/MPD/issues/516
2019-03-25 19:05:49 +01:00
Max Kellermann 977a4570d9 Merge branch 'v0.21.x' 2019-03-21 11:49:41 +01:00
Max Kellermann 8fc3c5c612 event/ServerSocket: add HAVE_UN check to AddAbstract()
Closes https://github.com/MusicPlayerDaemon/MPD/issues/510
2019-03-20 13:06:09 +01:00
Max Kellermann ec5be91ff6 filter/ffmpeg: new filter plugin 2019-03-18 18:56:06 +01:00
Max Kellermann c673528cff filter/hdcd: new filter plugin based on FFmpeg's "af_hdcd" 2019-03-18 13:48:24 +01:00
Max Kellermann 4722175049 Merge branch 'v0.21.x' 2019-03-18 10:01:00 +01:00
Jörg Krause c66389a453 meson.build: require Meson 0.49.0
Meson 0.49.0 adds native support for `libgcrypt-config` which is
necessary for detecting libgcrypt dependencies, as the latest
version 1.8.4 of libgcrypt does not provide a .pc file.
2019-03-18 09:11:46 +01:00
Max Kellermann b63c1a2144 increment version number to 0.21.7 2019-03-18 09:11:16 +01:00
Max Kellermann 3a901098e9 release v0.21.6
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlyOz50QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEub0D/oDIXjCyFredPqElU6wgHKmJIWHXiPMIzY2
 L5dK3ilGcON3ZDK4myoYvA5dkqat11u72x5TG3crcm8rITXuNJr93ONomZnfRvkq
 NwG5JHcexJOOm/ppaE7xd0VmfifRlJWpm+nqgPrObvMz+dIWQIOojYOGLeLYxUvC
 0i8mmfs6dIir+vpH13U9r3EPa78AZcuKttkZaK1ByaoK32RKAYPFIQvZgfWLI4Kj
 RUOrH9piEOGVx+vKw54rj69S+a8Do0LtMhnzOWmfrG8XQzS4W6dsp6gunYsFA9gR
 DZsERbu70JGJ8mrIKrrbXNT4/M06hTyAwob9PoRybi2aCP5BvfgBaM6qCeTNKKgQ
 YNLXBZVMbF/hbkoPG+DiS9S5Meyp8T3GYjaT4Bi8GufJu7HGERPp721PPPJLeyBg
 SpQo9SeS6xHA0bquQ1BJ3FV0JVn31w+taybMK+5eZqxS3xDjlVNorU2Dua2tkJKW
 IoIdoTfsU498V3RgPYrefUt0jLKbfGHTiyL1vZ2inZyK0AswebKFYyIFZnHLXkO2
 Pi2NOuE5RYmqRmB4TEwvLubP0nW5OI5lHCyvY/2GVjankPW5ufPtJMcpjs3hvx4Y
 5ORmEJBx5d5Y2NG1rZdnWv+b4x02MA8eAD2L3pq7WJ148AkZD3ddBBm7MpIJuW/n
 fFH7/jl30A==
 =EnrO
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.6'

release v0.21.6
2019-03-17 23:58:54 +01:00
Max Kellermann 808dd7cc54 release v0.21.6 2019-03-17 23:52:13 +01:00
Max Kellermann 62a129c18f PlaylistFile: ignore empty playlist names
Closes https://github.com/MusicPlayerDaemon/MPD/issues/465 and
https://github.com/MusicPlayerDaemon/MPD/pull/466
2019-03-17 23:46:36 +01:00
Max Kellermann c18cd941aa lib/xiph: disable Tremor detection if libvorbis was found
And disable libvorbis detection if Tremor was explicitly enabled.

This fixes a crash bug caused by libvorbis/Tremor ABI conflict caused
by commit 4f7d52dbf2
2019-03-17 23:36:52 +01:00
Max Kellermann 6d12c22653 decoder/ogg: ignore the BOS packet after seek to the beginning of song
Previously, MPD would skip the current song after attempting to seek
to its beginnig, because that was a seek to offset 0.  At offset 0,
MPD will see the BOS packet again, which results in throwing
StopDecoder in MPDOpusDecoder::OnOggEnd().

Closes https://github.com/MusicPlayerDaemon/MPD/issues/470
2019-03-17 23:14:59 +01:00
Max Kellermann b76d78e6ae output/sles: enable power saving mode 2019-03-17 18:04:40 +01:00
Jacob Vosmaer 0a6e484b1a output/plugins/OSXOutputPlugin: add boost meson dependency 2019-03-17 16:59:24 +01:00
Max Kellermann a66097129d Merge branch 'v0.21.x' 2019-03-16 14:08:22 +01:00
Max Kellermann 0bb71f1f20 output/pulse: use pa_channel_map_init_extend() instead of _auto()
Unlike pa_channel_map_init_auto(), pa_channel_map_init_extend() does
not fail if there is no valid mapping for the given channel count, but
instead maps additional "AUX" channels.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/493
2019-03-16 14:03:10 +01:00
Max Kellermann 1aa7cdd602 decoder/opus: fix replay gain when there are no other tags
The `tag_builder.empty()` check was wrong for the SubmitReplayGain()
call.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/497
2019-03-16 13:55:19 +01:00
Max Kellermann 3bf521d5ca song/TagSongFilter: apply negation properly to multiple tag values
The old implementation didn't make a lot of sense; the "!=" operator
was not actually the opposite of "==".

Closes https://github.com/MusicPlayerDaemon/MPD/issues/505
2019-03-16 13:23:02 +01:00
Max Kellermann eed4e40ec6 Merge branch 'v0.21.x' 2019-03-14 20:32:04 +01:00
Max Kellermann 98b29f6d1c meson.build: remove the libwinpthread-1.dll dependency on Windows
Closes https://github.com/MusicPlayerDaemon/MPD/issues/507
2019-03-14 20:07:06 +01:00
Max Kellermann 59fdfd25cb command/database: fix "list" with filter expression
Disable the 0.11 compatibility mode if the only argument is a filter
expression.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/506
2019-03-14 19:50:09 +01:00
Max Kellermann 0d98677212 playlist/flac: copy the URI to fix use-after-free bug
Closes https://github.com/MusicPlayerDaemon/MPD/issues/508
2019-03-14 19:30:33 +01:00
Max Kellermann bfb7b0117f lib/ffmpeg/IOContext: allow partial reads 2019-03-13 10:39:43 +01:00
Max Kellermann f300ea62dc meson.build: increment version number to 0.22
Time to create a new unstable branch; stable development will now
continue in the branch v0.21.x
2019-03-07 19:10:17 +01:00
Max Kellermann 713c1f2ba9 Merge branch 'feature/playlist' of git://github.com/miccoli/MPD 2019-02-27 13:49:22 +01:00
Max Kellermann 44422b2b2f event/ServerSocket, config/Net: abstract socket support 2019-02-25 13:08:33 +01:00
Max Kellermann f10afd38b5 NEWS: mention the cdio_paranoia build failure fix 2019-02-25 13:08:33 +01:00
Max Kellermann f255a485b7 increment version number to 0.21.6 2019-02-22 15:28:03 +01:00
Max Kellermann 1930d5774d release v0.21.5 2019-02-22 15:23:33 +01:00
Max Kellermann 30e0644722 db/simple: call ReturnSong() on mounted database
Fixes a memory leak, or an assertion failure in the debug build.
2019-02-22 14:52:13 +01:00
Max Kellermann d5983dd362 storage/udisks2: use the relative path
Closes #487
2019-02-22 14:41:56 +01:00
Max Kellermann 8002bc752f NEWS: mention the udisks2 AlreadyMounted fix 2019-02-22 14:41:56 +01:00
Max Kellermann b59f37bc0a db/simple/Directory: close the Database in destructor
Fixes assertion failure.
2019-02-20 22:50:15 +01:00
Max Kellermann cf2d171ccc db/simple: reorder checks in assert() to fix assertion failure
`light_song.Get()` could cause an assertion failure because the
`Manual<>` object must not be used if uninitialized.

Regression by commit ebc006ab52
2019-02-20 21:24:01 +01:00
Max Kellermann d9c3215584 mixer/pulse: rename `scale` to `scale_volume`
Make it less generic, to avoid clashes.
2019-02-20 19:23:11 +01:00
Max Kellermann 674c137e5f NEWS: mention the TagMask typo fix 2019-02-02 15:17:25 +01:00
Max Kellermann ffc36d5255 input/buffered: implement seeking to end of file
Previously, a seek to the end of the file would cause an assertion
failure in SparseMap::Check() because the given offset was invalid.

Closes #453
2019-01-22 07:42:00 +01:00
Max Kellermann 05db6934eb FileCommands: fix deadlock in "albumart" command
Must lock the mutex before calling any of the unprotected InputStream methods.

Closes #462
2019-01-21 22:16:46 +01:00
Max Kellermann d1bdea8edb Merge branch 'shout_tls' of git://github.com/JakobOvrum/MPD 2019-01-20 21:03:42 +01:00
James D. Smith 22d669da18 Add APE mapping for album artist.
"De-facto" field mappings are available at http://wiki.hydrogenaud.io/index.php?title=Tag_Mapping.
2019-01-14 19:15:42 +01:00
Max Kellermann 1862a98a44 increment version number to 0.21.5 2019-01-04 19:31:07 +01:00
Max Kellermann 4634b94c83 release v0.21.4 2019-01-04 19:22:21 +01:00
Max Kellermann 1477b64d4f Merge branch 'patch-2' of git://github.com/HyShai/MPD
Closes #343
2019-01-04 19:04:52 +01:00
Max Kellermann a2c108f5ef NEWS: mention the Haiku build fix 2019-01-04 19:03:53 +01:00
Max Kellermann 22e6d95c4b remove libwrap support
libwrap is an obscure artefact from a past long ago, when source IP
address meant something.

And its API is "interesting"; it requires the application to expose
two global variables `allow_severity` and `deny_severity`.  This led
to bug #437.  I don't want to declare those variables; instead, I'd
like to remove libwrap support.

Closes #437
2018-12-28 14:16:02 +01:00
Max Kellermann 3c4ed9cbe3 db/update/InotifyQueue: catch UpdateService::Enqueue() exceptions 2018-12-28 14:00:58 +01:00
Max Kellermann 98f92d828a NEWS: mention the "ICY" -> "HTTP/1.1" change 2018-12-14 09:26:59 +01:00
Max Kellermann 4b7078297d db/upnp: use the generic ::CollectUniqueTags() function
This function implements the "group" feature on top of the
Database::Visit() method.
2018-11-19 20:08:10 +01:00
Max Kellermann 4fb4f6d1b7 increment version number to 0.21.4 2018-11-19 09:58:05 +01:00
Max Kellermann 43df4a7500 release v0.21.3 2018-11-16 13:27:58 +01:00
Max Kellermann 436ba3c96c output/alsa: drain the whole `ring_buffer`, not just one period
This fixes a problem which caused a failure with snd_pcm_writei()
because snd_pcm_drain() had already been called in the previous
iteration.  This commit makes sure that snd_pcm_drain() is only called
after the final snd_pcm_writei() call.

This fixes discarded samples at the end of playback.
2018-11-14 13:35:17 +01:00
Max Kellermann 5d12f52873 output/alsa: clear error after reopening device
When a playback error has occurred, MPD would never recover until one
restarts MPD.
2018-11-14 13:20:54 +01:00
Max Kellermann 8682183bc3 LogInit: default to journal if MPD was started as systemd service 2018-11-14 12:07:22 +01:00
Max Kellermann ccafe3f3cf output/alsa: don't generate silence if ALSA-PCM buffer has enough data
If our `ring_buffer` is smaller than the ALSA-PCM buffer (if the
latter has more than the 4 periods we allocate), it can happen that
the start threshold is crossed and ALSA switches to
`SND_PCM_STATE_RUNNING`, but the `ring_buffer` is empty.  In this
case, MPDD will generate silence, even though the ALSA-PCM buffer has
enough data.  This causes stuttering (#420).

This commit amends an older workaround for a similar problem (commit
e08598e7e2) by adding a snd_pcm_avail()
check, and only generate silence if there is less than one period of
data in the ALSA-PCM buffer.

Fixes #420
2018-11-14 11:17:59 +01:00
Max Kellermann 3830748de5 output/alsa: clear the `period_buffer` in LockCaughtError()
The method Cancel() assumes that the `period_buffer` must be empty
when `active==false`, but that is not the case when Play() fails.

Of course the assertion in Cancel() is not 100% correct, but I decided
to rather fix this in LockCaughtError() because the `period_buffer`
should only be accessed from within the RTIO thread, and this is the
only code path where `active` can be set to `false` with a non-empty
`period_buffer`.

Fixes #423
2018-11-14 10:24:08 +01:00
Max Kellermann 57e34823d8 increment version number to 0.21.3 2018-11-12 13:59:17 +01:00
Max Kellermann 3c93decdf0 release v0.21.2 2018-11-12 13:33:04 +01:00
Max Kellermann 060908d5c4 song/Filter: add operator "contains"
Closes #410
2018-11-12 12:49:01 +01:00
Max Kellermann 5eaf2b8fc3 output/control: always close the `AudioOutputSource` in `RELEASE`
Fixes a crash bug with `always_on` outputs which occurs because the
`AudioOutputSource` still has a pointer to an outdated `MusicChunk`.

Fixes #415
2018-11-12 12:21:59 +01:00
Max Kellermann 72184dccfc song/StringFilter: support regular expressions with "=~" and "!~"
This feature requires `libpcre`.
2018-11-11 12:55:35 +01:00
Max Kellermann fee75dc766 {output,mixer}/alsa: use snd_pcm_poll_descriptors_revents()
This call was missing, causing very high CPU usage when the ALSA
output plugin was used with dmix.

Closes #391
2018-11-11 12:37:29 +01:00
Max Kellermann a958abde2f Merge branch 'fix_362' of git://github.com/miccoli/MPD 2018-11-11 12:37:13 +01:00
Max Kellermann 583208db7e output/httpd: fix nullptr dereference crash bug
When `metadata_sent` is `false`, the plugin assumes there is metadata
which must be sent, even if no metadata page was passed to the plugin.
Initializing it to `true` avoids dereferencing this `nullptr`.

Fixes #412
2018-11-08 09:37:18 +01:00
Max Kellermann be8a52a914 NEWS: mention the ENABLE_ZLIB fix 2018-11-07 23:26:33 +01:00
Max Kellermann b1fe105904 output/Source: reset current_chunk in Open()
If the output is already open, the `current_chunk` pointer may be
bogus and out of sync with `SharedPipeConsumer::chunk`, leading to an
assertion failure in `SharedPipeConsumer::Consume()`.

Fixes #411
2018-11-07 00:17:48 +01:00
Max Kellermann 6c602811df decoder/ffmepg: fill AudioFormat from AVCodecContext, not AVCodecParameters
`AVCodecParameters` contains values from the codec detected by
avformat_find_stream_info(), but after avcodec_open2(), a different
codec might be selected with a different `AVSampleFormat`.  This leads
to misinterpretation of data returned from FFmpeg, leading to random
noise or silence.

This was observed with FFmpeg 4.0.2 and a TS container file containing
MP2.  A mp3-float codec was detected returning `AV_SAMPLE_FMT_FLTP`,
but finally the `mpegaudiodec_fixed.c` was used, returning
`AV_SAMPLE_FMT_S16`.

By using the audio format from `AVCodecContext`, we ensure that MPD
and FFmpeg always agree on the actual audio format in the buffer.

This removes the FFmpeg bug workaround from commit e1b032cbad which I
assume is obsolete after 7 years.

Fixes #380
2018-11-04 22:30:50 +01:00
Max Kellermann 08272cdee2 decoder/ffmpeg: require FFmpeg 3.1 or later
Drop some compatibility code.
2018-11-04 21:55:06 +01:00
Max Kellermann b14a5141a6 increment version number to 0.21.2 2018-11-04 19:47:04 +01:00
Max Kellermann aa0e4500c6 release v0.21.1 2018-11-04 14:08:16 +01:00
Max Kellermann ac0852b4e3 song/Filter: operator "==" never searches substrings in filter expressions
The protocol documentation says that the difference between `find` and
`search` is that `search` is case insensitive, but that's only half
the truth: `search` also searches for sub strings instead of matching
the whole string.  This part is undocumented and unfortunate, but at
this point, we can't change it.

However leaking this surprising behavior to the new filter expressions
was a bad idea; the "==" operator should never match substrings.  For
people who need that, we should add a new operator.
2018-11-04 13:57:34 +01:00
Max Kellermann 08e41e60e5 meson.build: downgrade Boost 1.67 error to warning
Some Boost 1.67 packages apparently have a workaround for the bug, so
let them build MPD.
2018-11-04 12:45:22 +01:00
Max Kellermann 10ec478a9c meson.build: refuse to build with buggy Boost version 1.67 2018-11-04 12:31:49 +01:00
Max Kellermann 86f1074905 lib/xiph/meson.build: the Vorbis encoder requires the Vorbis decoder
Without the Vorbis decoder, `libvorbis` is never detected, leading to
linker failures when attempting to build the Vorbis encoder.
2018-11-04 12:21:23 +01:00
Max Kellermann e3bc85d7bf meson.build: require Meson 0.47.2
Meson 0.47.1 suffers from a bug which breaks linking the MPD
executable because the `-lpthread` flag is not propagated from our
`thread.a`.

See https://github.com/mesonbuild/meson/pull/3895

Closes #403
2018-11-04 11:54:40 +01:00
Max Kellermann 6f242836e6 lib/xiph/meson.build: fix typo, replace `and` with `or`
Fixes linker failure when building without FLAC support.

Closes #400
2018-11-04 11:36:28 +01:00
Max Kellermann aba18924ee win32/build.py: link libstdc++ and libcc statically
Fixes #404
2018-11-04 11:10:00 +01:00
Max Kellermann 528f5b9cb9 song/Filter: allow escaping quotes in filter expressions
Closes #397
2018-11-02 19:15:08 +01:00
Max Kellermann 5a5229b499 net/IPv[46]Address: make the initializers more portable
Thanks to C++14, we can declare and fill variables inside `constexpr`
functions.  This means me can stop make assumptions on the `struct`
layouts without losing `constexpr`.

Closes #393
2018-11-02 17:47:43 +01:00
Max Kellermann bba22c9c8c system/FileDescriptor: check `__linux__` instead of `__linux`
`__linux` is the deprecated non-standard macros which appears to be
not present at all on PowerPC.

Closes #398
2018-11-02 16:50:38 +01:00
Max Kellermann 694c437a2c NEWS: mention the FFmpeg build fix 2018-11-02 16:50:35 +01:00
Max Kellermann b8989fafeb increment version number to 0.21.1 2018-11-01 17:23:47 +01:00
Max Kellermann 795789e79d release v0.21 2018-10-31 19:39:53 +01:00
Max Kellermann b1d68fe995 NEWS: mention the zeroconf_name %h substitution 2018-10-31 19:26:17 +01:00
Max Kellermann 06ca08ce55 output/roar: remove
Bugs in libroar which broke the MPD build have been annoying me for
quite some time, and the newest bug has now hit my main build machine:

 https://github.com/MusicPlayerDaemon/MPD/issues/377

Problem is the usage of the typedef `_IO_off64_t` in libroar's
`vio_stdio.h`:

 int roar_vio_to_stdio_lseek (void *__cookie, _IO_off64_t *__pos, int __w);

This `_IO_off64_t` is an internal implementation detail of glibc and
was removed in version 2.28.  Nobody must ever use it.  Why the ****
did the RoarAudio developers use it?  Not using internal typedefs
isn't exactly rocket science.

This annoys me enough to finally remove the plugin.  Anyway, I've
never heard of anybody using RoarAudio, so my best guess is that
nobody will notice.
2018-10-31 15:03:28 +01:00
Max Kellermann 56112a237c Listen: listen on $XDG_RUNTIME_DIR/mpd/socket by default 2018-10-30 22:14:54 +01:00
Max Kellermann 901229699e release v0.20.23
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlvXjC0QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEtCPD/sF4XSIfAOGeosHvCxJGJbia630TXIcgiGa
 5Idku72YHrCrpHtK4Wn9AxWHkVHn3hTTma7fziwtOiXgyrPR/2P5WqcdaGqGgGX0
 dUQkjDh5iBakTLpr1k7RapA7UaZU47Qp++V+6iU42SFjYXO/f1NYD0ltAWwygWm9
 qzFrTAaKmOqi3h+Cv0ZlwVrOEWdjkoqQ+9REvaivUljMRIFNLn197Y+cCDlrlPXX
 4v0LgYQ6dm4f62K9nqKvAe1ERKL6QO4uz4pSM5zd98+CE34Th/f0liN2SbvNF/xw
 rJY0G1kL1Jrmst5UBldcCCVqV1UGJ3wVejRDHZykazuaM5weHRtSR7tcbfVaZIyW
 3w3EyM7D2O7m2AqWSDpBsY1w97NxIlFm2JizE3FvCcf4hhvuNgKuXxS8NBS/zttv
 o4igWOZUw76VzhcR8hnlDduKdz+Ht/MuT3ziSPuBQlj0coJYmHkqziO6+sI+bXve
 1bzX/KNEd9DiN+kxR34U9fRKOCtUGfCZwvGRqiQcIEm/Uo/UrszAM2sXK6bQoPj2
 1ZEXJuvFJr3rLe4rsTZn7g12yIqwuSA+0xeMpR0NQvUFnsI4aWokgvo1MVWp934q
 D0yrGMuRJyTB5mq6jS119ZX+ReCqI5H2IPZ7hkHK6Sia0jFE+ySjNFTqpkaMo1mB
 4EfBNZPctg==
 =m57f
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.23'

release v0.20.23
2018-10-29 23:44:47 +01:00
Max Kellermann 637c96697f release v0.20.23 2018-10-29 23:31:17 +01:00
Max Kellermann 9b6a2589e5 Merge branch 'v0.20.x' 2018-10-29 23:06:32 +01:00
Max Kellermann cc5fab28af pcm/FloatConvert: fix compile-time integer overflow for S32
The compile-time calculation for `factor` overflows because `1<<31`
cannot be represented by `int`.  By casting to `uintmax_t` first, we
can avoid this overflow.

Closes #380
2018-10-29 22:50:54 +01:00
Max Kellermann 7aa1dceef6 player/Control: move IDLE_PLAYER to Player::SeekDecoder()
This emits the event even if PlayerControl::Play() is used to replay
the current song, which emits the missing "player" idle event.

Closes #381
2018-10-29 12:01:48 +01:00
Max Kellermann a75d2fdd5a NEWS: mention the new clang crash bug workaround 2018-10-29 12:01:28 +01:00
Max Kellermann e02c1adf79 increment version number to 0.20.23 2018-10-29 11:05:27 +01:00
Max Kellermann c2a2573aa5 release v0.20.22
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlvPX+UQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFElO8EACgPMaiN3m/x1hzJ3QTLzCXgeqSG1vuv1tC
 F+sFISLPx/IoVjTpvd9H8jMt7lD+SYB620pAfNyLIGZpWcTxu1wmaviOghqCqnGP
 sql0vtS9CrRGhsKDi5earox3zecylWJ3PRPXpy/4NjFuFUxE2ij/wbXzDb9UbtMg
 1WnVL++fAlFj54CnPR35XHglYU+X7/bMWApkVUfsKBgyX9aghqLYUIm0jaUjj3Bs
 xB/2Nemd1A88yrc4kqyzbFsN96S/W2eXhDYfPlDwFdplfoRJ8nrEMdwrsn0nabIF
 7x+OsAGAfrz3e00TZdiDSaIy7VU4EFV9ctZVonoCGUluBHL0iG7G7bj2cnd+hVnZ
 ecidfHMUqVO99elmUtWsUQwzbhL/TxM6Fzn2qDwqdwcCWDgHcn4fpXfsY0MRt6NK
 cUhCyspMTuhqS3ohLO6RfiWDActm6QL2IHiDty/WAe1Td0VjOiRQMq7CADHlgn/D
 IalN8kGyWHK5ew+3Iiw5zRoYjNXG4ALZN8cEqVh2R7i2uxh8+qm46HkhticAjfDM
 4mETs3oAZdpOGCgv6Q0eY7tQDKB13DD/303NJaVFb6Iew2TZCWDbFz5HjqYShCZi
 PgnPosdRg0LoQbMah4Uhsj6frs6LEBMpg6c7nScJN/1MoRaOyVNDg03X+rBmPe5z
 XULvdsZ8Sw==
 =8OQx
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.22'

release v0.20.22
2018-10-23 20:10:57 +02:00
Max Kellermann 9274bc15bc release v0.20.22 2018-10-23 19:52:37 +02:00
Max Kellermann 751fff07fb input/Error: work around clang bug leading to crash
Closes #373
2018-10-23 19:52:22 +02:00
Max Kellermann 005e691339 decoder/fluidsynth: adapt to API change in version 2.0
Closes #360
2018-10-23 18:44:28 +02:00
Max Kellermann 61eff1cddf Makefile.am: install the SVG icon
Closes #366
2018-10-22 18:39:50 +02:00
Max Kellermann c26703b7e6 SongFilter: check value.empty() after checking tag fallbacks
In this new order, a filter 'AlbumArtist ""' matches only on songs
which neither have `AlbumArtist` nor `Artist`.
2018-10-22 18:34:47 +02:00
Max Kellermann 66ab2de578 Merge branch 'v0.20.x' 2018-10-22 18:20:29 +02:00
Max Kellermann db27bb76e2 db: fix broken command "list ... group"
Grouping in the "list" command was completely broken from the start,
unlike "count group".  I have no idea what I have been thinking when I
wrote commit ae178c77bd, but it didn't
make any sense.

This commit is a rewrite of the feature.

For clients to be able to detect this feature, this commit also
increments the protocol version.
2018-10-22 13:08:24 +02:00
Max Kellermann 7cfe929c36 db/Count: print empty group if song without grouped tag exists
Be consistent with "list" responses.
2018-10-22 12:42:18 +02:00
Max Kellermann 53448e4633 tag/Fallback: add tag fallbacks for AlbumArtistSort, ArtistSort
Just like AlbumArtist falls back to Artist, AlbumArtistSort should
fall back tom AlbumArtist, ArtistSort and finally Artist.

Closes #355
2018-10-22 10:52:42 +02:00
Max Kellermann 01b6e1cbf2 test: use GTest instead of cppunit 2018-10-16 21:26:04 +02:00
Max Kellermann 94592c1406 build with Meson instead of autotools
So long, autotools!  This is my last MPD related project to migrate
away from it.  It has its strengths, but also very obvious weaknesses
and weirdnesses.  Today, many of its quirks are not needed anymore,
and are cumbersome and slow.  Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann 5b2374b949 player/Thread: calculate `buffered_before_play` based on a fixed duration
Previously, there was the setting `buffered_before_play` which
specified a percentage of the audio buffer, defaulting to `10%`.  That
was working well enough for quite some time, until high-quality audio
formats became common.

At 44.1 kHz, 16 bit stereo, MPD collected 2.3 seconds worth of data in
the buffer before starting playback.  With the same default settings
and 192 kHz, 24 bit stereo, that was only 0.27 seconds.

Making this depend on the byte size only leads to high latency at low
quality, and too little data at high quality.  The natural choice
would be to use a duration instead of a byte size, which should give
the same good experience with all audio formats.

Since the `buffered_before_play` configuration setting was not
understood well by users and caused more harm than good, this commit
deprecates it.  It has now no effect.
2018-09-23 15:46:29 +02:00
Max Kellermann a8e70f0901 db/proxy: forward `sort` and `window` to server 2018-09-02 17:51:30 +02:00
Max Kellermann 2d0b429b6a db/proxy: require libmpdclient 2.9 2018-09-02 08:21:11 +02:00
Max Kellermann 616abdda26 Merge branch 'v0.20.x' 2018-08-20 00:19:31 +02:00
Thomas Guillem f37ab5482b android: improve Settings UI and run mpd on boot
add 2 preferences to:
 - enable Wakelock when MPD is running (prevent suspend)
 - run MPD on boot

and display MPD logs
2018-08-20 00:07:18 +02:00
Thomas Guillem 54a5491b86 android: Main is now a service
- add Settings: Activity to start / stop MPD Service (Main).

- Main is a service that run in foreground with a notification. See
  Service.startForeground documentation for more details.

- Main.Client is used to control the service: start or stop it and also receive
  callbacks when service encounters an error, is killed, is started or is
  stopped.

- Main.start to start the service without any fallback.
2018-08-19 23:35:49 +02:00
Joshua Wise 29f78b18b1 storage/plugins/CurlStorage: URL-encode paths in CurlStorage::MapUTF8
When using a database that was not created with a WebDAV music_directory
(i.e., if using a remote database, on which updates happen locally) and
using the Curl storage plugin, MPD would previously send GET requests that
had unescaped spaces in them.  This change uses Curl's URL-encode API to
solve this.
2018-08-17 23:03:56 +02:00
Max Kellermann 38edb58054 increment version number to 0.20.22 2018-08-17 23:02:13 +02:00
Max Kellermann 1ba35e1fd4 release v0.20.21
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlt3CwMQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEiQcD/0S7NzE9nLsuTJJB9ElzOW17XiKkLKuDErQ
 P1r46APwa0agqfHFTUM5a+ifMCFQ4QTh0p+MiImYniBKmTnuKYBxZJFgHYojrPOS
 jxJbPJI6R7vLfo07kIem1jw/3YjqF4BDJyn9FYLBLgWz3IiFC/H4XH4XYxoQhTYL
 Xv0aGMCnil6gD2ENvx4by3tqsM9l5ktvPwR6bktRw4ImhgT5zHShpuPYZekas1ic
 +A1oCXFO4UrlZQ0sHdcG7Up8NOEJvAiNR5+BCnb9aR8l6M2Mzu2u715zSSWvTBI+
 SCa8lE/gkndJC2Q3BmPRp+OcWU/uwVIkWdJdCF8DgN5vmk3cLRJ/SpHGkR1iYSvF
 MUW8QF0tc2Xctv0NHYXlDj6wVVJ+OWNUcNy6SWHAT7o5S0ppB+2nesAfTVqqGK/Z
 yRmcW5CvYNH8dfN7WBkLehN57dpI6O1YkfF30xCPcT+fu4oBYv7owU4MqFVcJN2r
 FEbTZCfRFGjF7Kmb6aF+mFMhTnqYNEZjFS0SljLJWjlimLaSfgTXdEv23IpxIMnV
 i+CEy7B2RseR31tmCekyWxdLnNJPYC4Zqwer8dd7yrY/exEM/6x9JQDUbCaGccar
 NlwmCj6uDKXxU3tkb9Mk77oX51dFL58BtpoQw/DfXRWSX+UsAxFioyAbJ9juJUrM
 JO9WMABo0Q==
 =2zvn
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.21'

release v0.20.21
2018-08-17 20:02:27 +02:00
Max Kellermann 98afae2520 release v0.20.21 2018-08-17 19:50:59 +02:00
Max Kellermann fb5f9baf9c android/build.py: enable libexpat for the "curl" storage plugin 2018-08-17 17:15:05 +02:00
Joshua Wise a5cc13b0c5 build: Add libexpat to the crosscompile build on Windows.
The Curl plugin requires libexpat in order to work these days, so we should
download and build it in order to get the plugin enabled on Windows.
2018-08-17 17:13:39 +02:00
Max Kellermann f6b3a88723 Merge branch 'master' of git://github.com/skidoo23/MPD 2018-08-14 19:02:37 +02:00