Max Kellermann
4abcb08cc9
tag/{aiff,riff}: fix ID3 chunk padding
...
Apply padding only to the fseek(), not to the chunk size. This fixes
bogus "failed to read riff chunk" messages when the last chunk has an
odd size.
See http://bugs.musicpd.org/view.php?id=4486
2016-02-19 17:31:20 +01:00
Christian Halaszovich
3392cbbd91
Emit a warning if the OutputThread fails to get realtime scheduling
...
This only applies to linux systems. Here, sched_setscheduler() is
called to get realtime scheduling. With this patch, the return value
of this function is now checked and a warning / error message is
generated if it fails.
2016-02-19 17:09:44 +01:00
Chris Spiegel
e7b211f2c0
Add TAK as a supported FFmpeg format.
2016-02-12 18:49:10 -08:00
Max Kellermann
6c5bc9b4a3
lib/expat: use C++ exceptions instead of class Error
2016-02-07 12:58:20 +01:00
Max Kellermann
cd2f65aafc
upnp/ContentDirectoryService: use AtScopeExit() for ixmlDocument_free()
...
For exception-safety.
2016-02-07 12:56:55 +01:00
Max Kellermann
3ee5093b03
lib/upnp: use C++ exceptions instead of class Error
2016-02-07 12:53:21 +01:00
Max Kellermann
6e2ad6860f
lib/upnp/ClientInit: use class ScopeLock
2016-02-07 12:53:21 +01:00
Max Kellermann
8610eb84c6
util/RuntimeError: add missing include
2016-02-07 12:53:21 +01:00
Max Kellermann
a2e008347c
Main: catch and log C++ exceptions
2016-02-07 12:42:09 +01:00
Max Kellermann
a1ef0159e3
playlist/PlaylistStream: catch and log C++ exceptions
2016-02-07 12:18:58 +01:00
Max Kellermann
1c5f76635a
playlist/SongEnumerator: wrap song in std::unique_ptr
2016-02-07 11:58:54 +01:00
Max Kellermann
e2a0fd7a28
playlist/cue/CueParser: Get() returns std::unique_ptr
2016-02-07 11:58:17 +01:00
Max Kellermann
5869a4ba2d
playlist/cue/CueParser: use std::unique_ptr
2016-02-07 08:31:51 +01:00
Max Kellermann
ac9a93261b
playlist/cue/CueParser: use C++11 initializers
2016-02-07 08:30:49 +01:00
Max Kellermann
4b79f0047d
db/DatabaseError: add exception class DatabaseError
2016-02-07 01:09:33 +01:00
Max Kellermann
6a789b660a
command/CommandError: move code to ToAck(DatabaseErrorCode)
2016-02-07 01:09:10 +01:00
Max Kellermann
0d8e44a079
db/DatabaseError: rename enum db_error and make strictly-typed
2016-02-07 01:01:10 +01:00
Max Kellermann
f097952b42
lib/upnp: use std::unique_ptr
2016-02-06 23:57:29 +01:00
Max Kellermann
224d511616
upnp/Discovery: use std::unique_ptr in WorkQueue
2016-02-06 22:26:14 +01:00
Max Kellermann
050c6cc4b0
upnp/Discovery: use AtScopeExit() for exception-safety
2016-02-06 22:06:43 +01:00
Max Kellermann
bc2d23ff0d
util/ScopeExit: new utility library
...
Similar to boost::scope_exit, but fewer include dependencies.
2016-02-06 22:03:37 +01:00
Max Kellermann
2939fadd6a
decoder/Control: use ScopeLock
2015-12-31 13:45:10 +01:00
Max Kellermann
ef260377c3
decoder/Internal: use ScopeLock
2015-12-31 13:44:19 +01:00
Max Kellermann
b9213df64b
decoder/API: use ScopeLock
2015-12-31 13:43:35 +01:00
Max Kellermann
aa7694047b
decoder/Thread: pass InputStream errors to DecoderControl::error
...
Give MPD clients access to the error condition.
2015-12-31 13:39:13 +01:00
Max Kellermann
e2bc63217a
decoder/Thread: decoder_input_stream_open() returns std::unique_ptr<InputStream>
...
Fixes memory leak after InputStream::Check() failure.
2015-12-31 13:39:13 +01:00
Max Kellermann
6c5b8bcf9d
decoder/Thread: log all errors
2015-12-31 13:38:35 +01:00
Max Kellermann
e425fe3f97
decoder/Thread: use std::unique_ptr<InputStream>
2015-12-31 13:12:28 +01:00
Max Kellermann
6507993972
decoder/Thread: move decoder_command_finished_locked() to DecoderControl
2015-12-31 13:06:31 +01:00
Max Kellermann
f081696f62
decoder/Thread: convert "int ret" to "bool success"
2015-12-31 13:02:55 +01:00
Max Kellermann
09157c3130
decoder/Thread: use ScopeLock in decoder_run_stream()
2015-12-31 13:01:49 +01:00
Max Kellermann
00626b1633
decoder/Thread: use std::unique_ptr<InputStream>
2015-12-31 13:01:03 +01:00
Max Kellermann
7e0cdbe502
decoder/Thread: use ScopeUnlock for exception-safety
2015-12-31 12:59:06 +01:00
Max Kellermann
ca08902d71
decoder/Thread: use ScopeLock in TryDecoderFile()
2015-12-31 12:58:58 +01:00
Max Kellermann
fad0e834d5
decoder/Thread: always unlock mutex before returning from TryDecoderFile()
...
Remove that surprising rule.
2015-12-31 12:57:35 +01:00
Max Kellermann
dc76eb6139
decoder/Thread: mutex not locked for decoder_run_{file,stream}()
2015-12-31 12:42:02 +01:00
Max Kellermann
55e113c7a7
decoder/Thread: document locking rules
2015-12-31 12:36:32 +01:00
Max Kellermann
b62f5e079e
decoder/Thread: use ScopeLock for exception-safety
2015-12-31 12:36:00 +01:00
Max Kellermann
ac1eaff6ec
thread/Mutex: add class ScopeUnlock()
2015-12-31 12:30:53 +01:00
Max Kellermann
45f6129ae7
player/Control: don't stop playback in Play()
...
Instead of stopping playback completely, only CANCEL the queued song
if necessary, and use the SEEK command to play the selected song.
SEEK will take care for current playback state.
2015-12-29 13:49:15 +01:00
Max Kellermann
f3503e0026
fs/DirectoryReader: use C++ exceptions instead of class Error
2015-12-29 12:56:26 +01:00
Max Kellermann
826a654c95
fs/DirectoryReader: use C++11 initializer
2015-12-29 12:56:26 +01:00
Max Kellermann
08754e6ce7
system/Error: add IsAccessDenied()
2015-12-29 12:56:26 +01:00
Max Kellermann
3843972b05
command/Error: workaround for gcc 4.x rethrow_exception(exception_ptr)
2015-12-29 12:39:28 +01:00
Max Kellermann
37862f0f20
PlaylistFile: convert more APIs from Error to std::exception
2015-12-28 14:20:37 +01:00
Max Kellermann
1f184f4aec
PlaylistFile: throw exception on spl_map_to_fs() failure
2015-12-28 14:20:37 +01:00
Max Kellermann
db5a691693
PlaylistFile: remove obsolete function TranslatePlaylistError()
2015-12-28 14:20:37 +01:00
Max Kellermann
48693250a4
command/Error: no std::exception_ptr forward declaration
...
This breaks on some standard library implementations.
2015-12-28 14:20:37 +01:00
Max Kellermann
570dcb6309
command/Error: support nested exceptions
2015-12-28 07:00:01 +01:00
Max Kellermann
19e43087a8
command/Error: move code to ToAck(std::exception_ptr)
2015-12-28 06:53:52 +01:00
Max Kellermann
fe0b6a1117
PlaylistFile: convert system_error::ENOENT to PlaylistResult::NO_SUCH_LIST
2015-12-28 06:44:01 +01:00
Max Kellermann
72851647ca
PlaylistError: fix NoSuchSong() code
2015-12-28 06:44:01 +01:00
Max Kellermann
1c90400081
command/Error: pass std::exception_ptr to PrintError()
...
Necessary to preserve type information. The try/catch sequence didn't
work previously.
2015-12-27 06:43:55 +01:00
Max Kellermann
672e18cac9
system/Error: fix duplicate strerror() call
...
Apparently, the std::system_error constructor appends strerror()
already.
2015-12-27 06:05:53 +01:00
Max Kellermann
e939d667d9
protocol/Ack: add exception class wrapping enum ack
2015-12-18 09:53:02 +01:00
Max Kellermann
8bb5a565cd
PlaylistError: add exception class wrapping enum PlaylistResult
2015-12-18 09:21:11 +01:00
Max Kellermann
7562c5751c
db/Configured: allocate ConfigBlock on the stack
2015-12-18 09:17:12 +01:00
Max Kellermann
e6e7d6dbd6
fs/io/Reader: use C++ exceptions instead of class Error
2015-12-18 01:08:16 +01:00
Max Kellermann
fe60c52c70
system/Error: add MakeErrno(), MakeLastError()
2015-12-18 01:08:16 +01:00
Max Kellermann
93f4590453
system/Error: add IsFileNotFound()
2015-12-18 00:54:23 +01:00
Max Kellermann
1098d271b8
util/Error: add bridge to std::exception
2015-12-18 00:24:43 +01:00
Max Kellermann
51168169e7
util/Tokenizer: use std::runtime_error on syntax error
2015-12-16 11:34:26 +01:00
Max Kellermann
d256a0e98f
config/ConfigFile: use std::exception on syntax error
2015-12-16 11:13:16 +01:00
Max Kellermann
6717325c3f
config/ConfigFile: use std::unique_ptr
2015-12-16 11:13:16 +01:00
Max Kellermann
c4a0571e7a
config/ConfigFile: fix typo in format string
2015-12-16 11:13:16 +01:00
Max Kellermann
e4a06da14e
fs/io/OutputStream: use C++ exceptions in Write()
2015-12-16 10:24:43 +01:00
Max Kellermann
36d6ead65c
fs/io/GzipOutputStream: use C++ exceptions in constructor
2015-12-16 10:14:56 +01:00
Max Kellermann
7eae3bc8c5
fs/io/FileOutputStream: use C++ exceptions in Commit()
2015-12-16 00:33:33 +01:00
Max Kellermann
24b2198668
fs/io/FileOutputStream: use C++ exceptions in constructor
2015-12-16 00:33:30 +01:00
Max Kellermann
d29be0f460
db/simple: use std::unique_ptr<GzipOutputStream>
2015-12-16 00:33:10 +01:00
Max Kellermann
8f93c36466
command/AllCommands: catch and report std::exception
2015-12-16 00:07:51 +01:00
Max Kellermann
3092e5a8a5
system/Error: helper library for constructing std::system_error
2015-12-16 00:07:51 +01:00
Max Kellermann
55f95b3ac9
Log: C++ exception support
2015-12-16 00:07:51 +01:00
Max Kellermann
c11345c4d9
db/DatabaseLock: add class ScopeDatabaseUnlock
2015-12-16 00:07:51 +01:00
Max Kellermann
e31f0b8b0c
db/simple: use class ScopeDatabaseLock
2015-12-16 00:07:51 +01:00
Max Kellermann
7dd3b72a8c
db/DatabaseLock: add ScopeDatabaseLock::unlock()
2015-12-16 00:07:51 +01:00
Max Kellermann
9bc0fada5c
release v0.19.12
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWcH4fAAoJECNuiljG20USbAcQAKX0G+V10HI2Bmf7JJ3pWW96
GiOBpd66pEPioXdfpxOQNLglKS+rcproCWZnQf/VSoYN5d6pT6VLCQiMpdm3ZkNO
ZLWGhJ0Md1PGj+xjfGrMw95g+cqV+wMo1PETOsE/MtINqN/nMyQNI7lFnZ8xYEAP
DhJB1pXdchHvUVM3o+vpGSEOScn3XstL8+a/K5+Rvxptew4QDI/0ucyTLcLaaxkY
r/bH8wTDSMSpez4M5Me9MQ9OJ9NUPgudvs8Ppzji26lMcQRnZGdcffGTj08Lv+1b
gyx25t8sija6XVt6AEqn8KX+YAhe94c7ROq5PzdLeUszUf4YFIqaZ7O19PSYuuB6
APfr25A7NBQtJ88Wjw6slco+mAwbLZwQewZtFZCq6Y8J3oRBG6bpaPhFWUyygqTL
rIU735+o3FvqijKJUtKG0rAz+wfsPk6TMvIg4VMUaQXneS1LbzZe2Nz2FGxtonpd
Ua/tBQ/LnX8Utueuhy0kH06qPqq1/eSCMZIH/yphfR+B5k90h719RN/BR5xPv9Fb
vRdiSgPtfACAHvnadqcpVGjmmCQtXurC7gFceEc4Anign5kkSSGrDmo9OYhxwSkl
8A2GeOmxNrs2aFkNelnH3C6BTOEcewbXEmPQhTiBoX9LDmDK31rfSoVI0SUt7rbR
Sbt21m+7ThEqFfafZ8a/
=hDes
-----END PGP SIGNATURE-----
Merge tag 'v0.19.12'
release v0.19.12
2015-12-15 22:05:21 +01:00
Benno Fünfstück
cae2811762
fix mpd crash on invalid utf8 stream title
2015-12-15 21:49:53 +01:00
Max Kellermann
28f9a0a900
command/other: re-allow "lsinfo /"
...
This compatibility hack was accidently broken by commit f072cbbb
2015-11-13 21:04:02 +01:00
Max Kellermann
a6bb3cf60a
command/queue: use StringIsEqual() instead of memcmp()
...
memcmp() can overflow the buffer.
2015-11-13 21:02:33 +01:00
Max Kellermann
004da5d385
queue/Save: fix "Malformed playlist line in state file"
...
Regression by commit 738583e3
2015-11-13 20:45:50 +01:00
Max Kellermann
0368282486
player/Control: add code comments
2015-11-13 16:02:07 +01:00
Max Kellermann
4404f20cf4
player/Control: Seek*() returns Error information
2015-11-11 19:56:09 +01:00
Max Kellermann
faca8bc02a
decoder/Control: Seek() returns Error information
2015-11-11 19:56:08 +01:00
Max Kellermann
5e93c05095
queue/Playlist: seek methods return bool/Error instead of PlaylistResult
2015-11-11 19:56:01 +01:00
Max Kellermann
0f4f04eaa4
command/CommandError: send verbose error message to client
2015-11-11 19:51:09 +01:00
Max Kellermann
2e55d561d3
PlaylistError: remove unused code "ERRNO"
2015-11-11 19:50:57 +01:00
Max Kellermann
76a9049739
decoder/Control: State::ERROR is illegal
...
The state ERROR can only be entered during decoder initialization, and
Seek() may only be called after initialization has been finished.
2015-11-11 17:46:06 +01:00
Max Kellermann
27bfcda20d
decoder/Control: use switch/case in Seek()
2015-11-11 17:46:03 +01:00
Max Kellermann
c6d1d360a3
player/Control: use class ScopeLock
2015-11-11 17:43:56 +01:00
Max Kellermann
afc1236b06
player/Control: move code to ClearError()
2015-11-11 17:41:02 +01:00
Max Kellermann
bedd5f00f8
player/Control: move code to SeekLocked()
2015-11-11 16:56:24 +01:00
Max Kellermann
36239895bd
player/Control: add Lock prefix to locking method names
2015-11-11 16:50:57 +01:00
Max Kellermann
738583e3d4
StateFile: use StringAfterPrefix() instead of StringStartsWith()
2015-11-11 15:34:36 +01:00
Max Kellermann
c513478c31
db/simple: use StringAfterPrefix() instead of StringStartsWith()
2015-11-11 15:27:56 +01:00
Max Kellermann
a944927b56
util/StringPointer: add method empty()
2015-11-11 15:13:46 +01:00
Michael Paquier
315f9d98f6
Main: fix build failure on non-Linux systems
2015-11-10 08:38:53 +01:00
Max Kellermann
b9a8b0d146
util/StringView: add method Literal()
2015-11-06 10:03:45 +01:00
Max Kellermann
4d15db0134
util/StringCompare: use StringView to simplify inline implementations
2015-11-06 10:03:14 +01:00
Max Kellermann
0d1a54262c
playlist/soundcloud: make key_str "static const"
2015-11-06 09:52:35 +01:00
Max Kellermann
e7ef7f5159
db/update/InotifyQueue: use StringAfterPrefix()
2015-11-06 09:49:39 +01:00
Max Kellermann
3dc989bccb
input/alsa: use StringAfterPrefix()
2015-11-06 09:49:22 +01:00
Max Kellermann
75d46efd23
util/UriUtil: use StringAfterPrefix() instead of memcmp()
2015-11-06 09:49:22 +01:00
Max Kellermann
b83392cb04
util/UriUtil: move code to SkipUriScheme()
2015-11-06 09:49:22 +01:00
Max Kellermann
7640d333f4
util/UriUtil: make variables more local
2015-11-06 09:49:22 +01:00
Max Kellermann
c880099deb
util/StringCompare: add StringIsEmpty()
2015-11-06 09:37:07 +01:00
Max Kellermann
42f5ecd4a1
util/StringCompare: use strncmp() instead of memcmp() in StringStartsWith()
...
Some optimized implementations of memcmp() may not start from the
beginning of the string, and may thus segfault.
2015-11-06 09:24:18 +01:00
Max Kellermann
733989a284
util/StringUtil: move comparison functions to StringCompare.cxx
2015-11-06 09:20:18 +01:00
Max Kellermann
493f74d94d
tag/id3: convert path from "wchar_t*" to "char*" for error message
2015-11-06 09:20:18 +01:00
Max Kellermann
3b71e2abef
player/Thread: call DecoderCommand::SEEK only on existing decoder
...
If the decoder was just started, it already seeks to the desired
position.
2015-11-05 00:41:54 +01:00
Max Kellermann
30cad0c5f1
player/Thread: move code to WaitDecoderStartup()
2015-11-05 00:39:30 +01:00
Max Kellermann
3a387643b3
player/Thread: move player_command_finished() to PlayerControl
2015-11-05 00:38:09 +01:00
Max Kellermann
e6b37703da
player/Thread: copy pc.seek_time in ActivateDecoder()
...
If this gets called while seeking, do the right thing. This moves the
elapsed_time setter from method Run(), which is now redundant.
2015-11-05 00:30:04 +01:00
Max Kellermann
990f473bb3
player/Control: initialize seek_time in EnqueueSongLocked()
...
Allows removing a few special cases in the player thread.
2015-11-05 00:29:03 +01:00
Max Kellermann
cf1de78205
player/Thread: remove decoder error check from ActivateDecoder()
...
It is futile to check for decoder errors before the decoder has
finished startup. At this time, it's unlikely that the decoder has
already failed.
2015-10-28 18:24:42 +01:00
Max Kellermann
ccea6dd74b
player/Thread: rename WaitForDecoder() to ActivateDecoder()
...
.. and fix its API documentation.
2015-10-28 18:20:48 +01:00
Max Kellermann
166b490eed
player/Thread: move code to ForwardDecoderError()
2015-10-27 23:28:13 +01:00
Max Kellermann
efd871ad2f
player/Thread: clear pc.next_song earlier in WaitForDecoder()
2015-10-27 23:25:50 +01:00
Max Kellermann
b78896d64e
player/Control: use CANCEL to clear next_song in Seek()
...
Assigning nullptr to next_song may disrupt the player thread and
render undefined behavior.
2015-10-27 23:09:03 +01:00
Max Kellermann
e753c924ef
player/Thread: merge the cross_fading flag into enum CrossFadeState
2015-10-27 22:43:46 +01:00
Max Kellermann
9dc7b5a6d9
player/Thread: move ResetCrossFade() calls to where pipes are set
...
Move ResetCrossFade() to where cross-fading would actually break, to
make the cross-fading state more reliable.
2015-10-27 22:11:56 +01:00
Max Kellermann
f5d21c9cdb
player/Thread: add method ResetCrossFade()
2015-10-27 22:05:41 +01:00
Max Kellermann
6ce13646da
player/Thread: more CrossFadeState documentation
2015-10-27 21:12:20 +01:00
Max Kellermann
151653dd98
player/Thread: automatic CrossFadeState enum values
2015-10-27 21:05:10 +01:00
Max Kellermann
619cfe6a1c
player/Thread: move enum CrossFadeState into the Player class
2015-10-27 20:48:14 +01:00
Max Kellermann
8acf996d90
command/queue: add range parameter to plchanges and plchangesposid
2015-10-27 20:35:40 +01:00
Max Kellermann
15e432204e
pcm/Order: new library to convert from FLAC to ALSA channel order
...
This new library is integrated in the PcmExport class and (if enabled)
converts MPD's channel order (= FLAC channel order) to ALSA channel
order.
This fixes:
http://bugs.musicpd.org/view.php?id=3147
and
http://bugs.musicpd.org/view.php?id=3255
2015-10-27 11:44:23 +01:00
Max Kellermann
4b1630e1ec
AudioFormat: define that channel order follows the FLAC convention
...
Basic definition to solve http://bugs.musicpd.org/view.php?id=3147 and
http://bugs.musicpd.org/view.php?id=3255
2015-10-27 11:44:23 +01:00
Max Kellermann
94f850a588
release v0.19.11
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJWL0cEAAoJECNuiljG20USkHkP/0m3kFEEgqauAIbI1t0TkKOp
2ii5iHZeMAlsxGEc5SX5fFoXM6STbXq/3+OXBf+OnABh9b03o744QAAwh1ei9tiQ
kMysbN2fbpHkuchx1JfrOU1ad3qfWXQri8csTtx5eRYpgyqF7Mfl1SoY1nkpherd
j4MVq7MVqBhwCqpAfJvTFTSOlNrJ4bBcvIgGslhFYhRxMRM83KgFS//lHvbXWnOg
fjYEO34nz0rjCfz6x2r7ZQBLeQVr9n6h24iYhSTnU7Xq9o2ezWlVRIm9YVhxoZKf
/MRJuAzaHhGID8IvX7dPxdQJ+feUhQXSv8HSjOJBO6R2dqIScE3D6EIBHy8Cj9Bk
O2D1SgmR+2NnjNz2GUjCIKHm9c9jTgv+rnZ2l8hweS2oUQOPHbCtOoCNAfwyP+/Y
ms1CavNl7bUuvWrM1ipM2ZK6QfW9P4F1dtmwqtJCsqdGFyQyfACcxqmlkfxhB2vI
NyvKAOn/TlWWQscF9id3r90sEir/J9e7IJ6oZh+uvyIfOtt8wR/Jm5/H1MA7j3iX
XmNbe1GY3WHjCH2lRr3tIRKAE8I3HAtBzwhvq/miSESrkEnJ06VMatkoMRQT63gy
62yaCg+ZWiBRp07ygiedYuGL19pDOhqRjY3U/b/0EHMb9ux083nuUTssqgzzO2OP
9OPao5CPs4M4QvmiG/wF
=RdQt
-----END PGP SIGNATURE-----
Merge tag 'v0.19.11'
2015-10-27 11:05:47 +01:00
Max Kellermann
5719207dfa
gme: don't loop forever, fall back to GME's default play length
...
Fixes http://bugs.musicpd.org/view.php?id=4432
2015-10-26 17:16:20 +01:00
Max Kellermann
a84fbbe327
decoder/gme: free the gme_info_t as early as possible
2015-10-26 17:15:24 +01:00
Max Kellermann
3882c11450
decoder/gme: log the emulator type
2015-10-26 17:00:27 +01:00
Max Kellermann
08f77c2b60
decoder/gme: add option "accuracy"
2015-10-26 16:56:55 +01:00
Max Kellermann
93c97972b9
decoder/gme: call decoder_seek_error() on seek error
2015-10-26 16:32:39 +01:00
Max Kellermann
ac61d43720
output/Command: flush the mixer cache when enabling/disabling output
...
Fixes mixer lag (http://bugs.musicpd.org/view.php?id=4425 ).
2015-10-26 16:29:07 +01:00
Max Kellermann
22ebe0e58f
playlist/flac: re-add the plugin
...
This reverts commit d7d9dbd2c2
by
reimplementing it with the current MPD API.
3 years ago, I was wrong about the "embcue" plugin being able to
replace this one, because "embcue" reads a tag named "CUESHEET", while
this plugin reads the "CUESHEET" FLAC metablock. There's an important
difference between those two!
2015-10-26 13:16:01 +01:00
Max Kellermann
1958f78cc1
decoder/ffmpeg: fix crash due to wrong avio_alloc_context() call
...
Allocate the buffer dynamically using av_malloc(), and free
AVIOContext.buffer in the destructor, as mandated by the libavformat
documentation.
Fixes http://bugs.musicpd.org/view.php?id=4446
2015-10-26 13:06:29 +01:00
Max Kellermann
f072cbbba7
LocateUri: new library to classify URIs in a standard way
2015-10-22 09:39:28 +02:00
Max Kellermann
1a5b66b78d
SongLoader: move code to LoadFromDatabase()
...
Avoids the recursion in LoadFile().
2015-10-22 09:34:13 +02:00
Andreas Mair
bea5973e0c
Filter out this extra data and leading zeroes in "track" and "disc" tags.
2015-10-21 08:30:33 +02:00
Max Kellermann
0366dcf604
PlaylistPrint: fix -Wunused #ifndef ENABLE_DATABASE
2015-10-20 13:50:00 +02:00
Max Kellermann
8211d4a1c2
DetachedSong: check AllocatedPath::FromUTF8() result
2015-10-20 12:16:25 +02:00
Max Kellermann
fc2154ee92
DetachedSong: move code from Update() to LoadFile()
...
Avoid duplicate AllocatedPath::FromUTF8() invocations in two callers.
2015-10-20 12:10:42 +02:00
Max Kellermann
76f85e6f7b
command/DatabaseCommands: pass URI to handle_lsinfo2()
2015-10-20 12:07:18 +02:00
Max Kellermann
81ce684b35
command/FileCommands: fix access to absolute paths in "readcomments"
2015-10-20 11:25:46 +02:00
Max Kellermann
42bd888946
input/InputStream: remove obsolete method OverrideMimeType()
2015-10-20 11:18:35 +02:00
Max Kellermann
6bea346c41
output/httpd: use boost::intrusive::list instead of std::forward_list
2015-10-19 16:00:26 +02:00
Max Kellermann
8d23706354
util/DeleteDisposer: new utility class
2015-10-19 15:57:30 +02:00
Max Kellermann
62bfb1a273
decoder/mad: reduce memory usage while scanning tags
...
Allocate the frame pointers only when actually decoding the file.
2015-10-19 13:12:36 +02:00
Max Kellermann
38e86af75c
fs/Traits: use StringAfterPrefix() in Relative()
2015-10-19 10:56:13 +02:00
Max Kellermann
607c2c5ba2
util/StringUtil: add StringAfterPrefix()
2015-10-16 19:18:04 +02:00
Max Kellermann
85f58eb082
util/WStringUtil: fix indent
2015-10-16 19:17:54 +02:00
Max Kellermann
a7ee64a25b
decoder/mpcdec: use SampleTraits<SampleFormat::S24_P32>
...
Eliminates some duplicate code, and as a side effect, this works
around clang 3.8 compiler warning because a negative value was
shifted.
2015-10-16 18:12:32 +02:00
Max Kellermann
2a58f22649
decoder/mpcdec: use Clamp()
2015-10-16 18:11:42 +02:00
Max Kellermann
f066bb7716
unix/Daemon, playlist/...: remove unused Domain variables
2015-10-16 18:08:59 +02:00
Max Kellermann
4e3d182189
encoder/flac: fix crash with 32 bit playback
...
Copy to encoder->audio_format *after* adjusting the sample format to
S24_P32.
Fixes http://bugs.musicpd.org/view.php?id=4433
2015-10-16 18:05:34 +02:00
Max Kellermann
205fba74cf
tag/ApeLoader: fix buffer overflow after unterminated key
2015-10-16 14:55:40 +02:00
Max Kellermann
438b7b7bd0
util/ConstBuffer: add method MoveFront()
2015-10-16 09:00:36 +02:00
Max Kellermann
27a40a9843
util/StringView: add methods StripLeft(), StripRight()
2015-10-16 08:59:47 +02:00
Max Kellermann
c7b0e9b05b
lib/expat/Parser: delete the copy constructor/operator
2015-10-02 18:06:32 +02:00
Max Kellermann
356c829b76
util/StringView: new utility class
2015-09-30 22:21:46 +02:00
Anthony DeRossi
6b6c7b0920
update: apply .mpdignore matches to subdirectories
...
Wildcard matches are directly applied to all filenames in
subdirectories without any attempt at matching relative paths.
This change is based on the following feature request:
http://bugs.musicpd.org/view.php?id=3729
2015-09-30 21:50:34 +02:00
Anthony DeRossi
de332a16d1
event/ServerSocket: fix AF_UNIX address in use error
...
bind fails with an "address already in use" error if the socket path
already exists.
This was broken by cbb595ba
.
2015-09-30 21:50:34 +02:00
Anthony DeRossi
84ab3ee3af
unix/PidFile: fix empty PID file
...
This was broken by 4f29034f
.
2015-09-30 21:49:18 +02:00
Max Kellermann
ce0d896492
unix/Daemon, playlist/pls, ...: remove unused Domain variables
2015-09-17 23:15:54 +02:00
Max Kellermann
eae9cb4afe
Main: use config_domain for inotify error
2015-09-17 23:15:54 +02:00
Max Kellermann
459a812a54
notify: use "constexpr" only with glibc
...
The Mutex and Cond constructors are only "constexpr" with glibc, and
this is what this #ifdef is about.
2015-09-17 22:56:35 +02:00
François Revol
7743647460
output: add native Haiku audio output and mixer support
...
Also uses the notification system to display tags.
2015-09-17 22:46:46 +02:00
François Revol
1943b158fe
Haiku: add resources: application signature and flags
...
Since we do not handle B_QUIT_REQUESTED because the BApplication
does not Run(), use the background flag to avoid showing up in Deskbar.
2015-09-17 22:46:46 +02:00
François Revol
a36eeb5261
Haiku: add icon as resource definition file
2015-09-17 22:46:46 +02:00
François Revol
a8b00faba1
Haiku: add an HVIF icon
...
3D version reinterpreted from the official 2D design,
reusing existing Haiku icons.
Icon-O-Matic source file.
Same as data/artwork/icons/App_MusicPD in the Haiku tree as of hrev47609.
2015-09-17 22:46:46 +02:00
François Revol
bf73d0f905
notify: Don't use constexpr on Haiku
2015-09-17 22:46:46 +02:00
François Revol
193ffa06d9
system/SocketUtil: guard usage of SO_PASSCRED
...
Haiku has struct ucred but no SO_PASSCRED (yet).
2015-09-17 22:46:46 +02:00
François Revol
9d176e35d4
unix/Daemon: define WCOREDUMP() for platforms that don't support it
...
Haiku does not dump core, it just starts the debugger.
2015-09-17 22:46:46 +02:00
Will Tiffany
8461d71b52
CueParser.cxx: Append pregap to previous track
...
Only ignore indexes after first nonzero, preserving pregaps but
appending them to the previous track instead of prepending to the
current. The first index of the first track is used for the start time
regardless of its number. Unneeded bool last_updated removed.
2015-09-17 22:44:47 +02:00
Max Kellermann
e31cdf0df9
util/AllocatedString: fix off-by-one bug in Duplicate()
2015-09-01 23:33:19 +02:00
Max Kellermann
6f41791ea6
util/StringAPI: add UnsafeCopyStringP()
2015-09-01 21:16:22 +02:00
Max Kellermann
0bacbcd04e
util/StringAPI: fix include guard name
2015-09-01 21:12:16 +02:00
Max Kellermann
ffe689363f
util/AllocatedString: add constant "SENTINEL"
2015-09-01 21:11:22 +02:00
Max Kellermann
48d7fedbc0
thread/{Mutex,Cond}: remove obsolete comments
2015-08-25 12:52:13 +02:00
Max Kellermann
75dff64450
thread/Posix{Mutex,Cond}: use "constexpr" only with glibc
...
Apparently all other C libraries are not compatible with "constexpr".
Those which are not will get a performance penalty, but at least they
work at all.
2015-08-25 12:46:12 +02:00
Max Kellermann
f0b58c6f24
db/UniqueTags, tag/Set, ...: use typedef tag_mask_t
2015-08-24 11:53:30 +02:00
Max Kellermann
f3661b19c0
tag/Settings: move typedef tag_mask_t to Mask.hxx
2015-08-24 11:40:25 +02:00
Max Kellermann
2f5106c97f
tag/Settings: convert to C++
2015-08-24 11:20:45 +02:00
Max Kellermann
0c19418e84
tag/Settings: convert to bit mask
2015-08-24 11:20:45 +02:00
Max Kellermann
60c077c790
tag/Settings: add function IsTagEnabled() wrapping access to ignore_tag_items[]
2015-08-24 11:20:45 +02:00
Max Kellermann
7aaa4dda22
TagPrint: use unsigned integer
2015-08-24 11:20:45 +02:00
Max Kellermann
109b3700b5
Tag: include cleanup
2015-08-24 11:20:45 +02:00
Max Kellermann
71fecf4d1f
unix/PidFile: add missing include stdlib.h for strtoul()
2015-08-24 10:40:05 +02:00
Will Tiffany
0f75c79665
CueParser.cxx: ignore INDEX after first per track
...
Use the first INDEX in each TRACK section, instead of the last, for the
start time. This preserves the original CD layout (including gaps
between tracks), and avoids skipping sections of songs in more exotic
cuesheets (eg musical suite tracks).
Fixes 0004355 and 0003359
2015-08-23 15:49:50 +02:00
Max Kellermann
4f29034f11
unix/PidFile: use raw file descriptor instead of stdio
2015-08-15 16:42:07 +02:00
Max Kellermann
567bf445bf
unix/Daemon: move code to ReadPidFile()
2015-08-15 16:41:22 +02:00
Max Kellermann
28a0c46ca7
unix/Daemon: eliminate local variable "ret"
2015-08-15 16:41:21 +02:00
Max Kellermann
5fba8d773c
PlayerThread, ...: move to src/player/
2015-08-15 15:55:46 +02:00
Max Kellermann
36cd73df51
client, command: use StringIsEqual()
2015-08-14 19:48:30 +02:00
Max Kellermann
6f20889f00
command/CommandListBuilder: postpone "size" initialization
2015-08-14 19:42:11 +02:00
Max Kellermann
8e408725e9
protocol/Result: move current_command to class Response
2015-08-14 19:04:00 +02:00
Max Kellermann
d053797340
protocol/Result: move command_list_num to class Response
2015-08-14 19:00:02 +02:00
Max Kellermann
c8d0f947d2
protocol/Result: move error code to class Response
2015-08-14 18:57:44 +02:00
Max Kellermann
86e036c393
command: pass Response object to command callbacks
2015-08-13 12:48:31 +02:00