Commit Graph

1611 Commits

Author SHA1 Message Date
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