Commit Graph

1055 Commits

Author SHA1 Message Date
Max Kellermann 1195eb266e protocol/Ack: remove unused variable `ack_domain` 2020-10-28 15:47:05 +01:00
Max Kellermann 329382c1da event/SignalMonitor: add `noexcept` 2020-10-13 17:26:33 +02:00
Max Kellermann e0c75da266 playlist/cue/parser: pass StringView to Feed() 2020-10-05 20:33:58 +02:00
Max Kellermann dffd5831f8 test/fuzzer: a simple fuzzer using libFuzzer
This commit adds some basic infrastructure for fuzzers, and adds a
fuzzer for the CUE sheet parser.
2020-10-05 20:25:26 +02:00
Max Kellermann 85af4d6916 meson.build: add -Wdouble-promotion 2020-09-22 20:40:53 +02:00
Max Kellermann 85849c9396 decoder/plugin: add method protocols()
Similar to commit 4e2a551f30 but for
decoder plugins.  This is tailored for the FFmpeg decoder plugin which
implements some protocols (e.g. RTSP) as demuxer plugin.
2020-09-21 14:53:18 +02:00
Max Kellermann e8380cf2aa Merge branch 'v0.21.x' into master 2020-09-07 21:15:53 +02:00
Max Kellermann 1a5e0ef7c9 test/test_archive_iso9660.sh: use an odd chunk size to trigger bug
This makes the unit test fail.  D'oh!
2020-09-07 20:53:46 +02:00
Max Kellermann 979a7a1dcc test/run_input: add option --chunk-size 2020-09-07 20:52:37 +02:00
Max Kellermann 291be84704 Merge branch 'v0.21.x' into master 2020-09-07 20:18:40 +02:00
Max Kellermann 962cf32ba7 test/run_input: pass FileDescriptor to dump_input_stream() 2020-09-07 20:14:39 +02:00
Max Kellermann ae23682372 system/FileDescriptor: add method FullWrite() 2020-09-07 20:13:43 +02:00
Max Kellermann 540919f256 *: use nullptr instead of NULL 2020-09-07 20:08:27 +02:00
Max Kellermann 398281cd76 io/FileDescriptor: add method FullRead() 2020-09-07 20:07:47 +02:00
Max Kellermann 88446ccde9 test/run_filter: use Filter::Flush() 2020-09-07 20:07:40 +02:00
Max Kellermann 6238cc0734 test/run_filter: pass ConstBuffer<void> to FullWrite() 2020-09-07 20:07:33 +02:00
Max Kellermann fd4823c507 test/run_filter: fix error message 2020-09-07 20:07:29 +02:00
Max Kellermann 68bcfd8bf0 test/run_filter: check for partial writes 2020-09-07 20:07:24 +02:00
Max Kellermann 1d332746af test/run_filter: move code to WriteOrThrow() 2020-09-07 20:07:18 +02:00
Max Kellermann f3e133c617 test/run_filter: use class FileDescriptor 2020-09-07 20:07:13 +02:00
Max Kellermann 1678a6eb59 test/run_filter: ensure that partial frames will not get passed to the filter 2020-09-07 20:07:08 +02:00
Max Kellermann b4dc2c07d5 test/run_filter: move the buffer into the loop 2020-09-07 20:07:03 +02:00
Max Kellermann d7838950d8 test/run_input: use WithBufferedOutputStream() 2020-09-07 20:04:13 +02:00
Max Kellermann 2e93a83dd5 test/run_input: convert pointer to reference 2020-09-07 20:02:12 +02:00
Max Kellermann 2bdf1b2284 test/meson.build: add explicit dependency from run_output on libevent.a
We could exclude that feature if neither ALSA nor httpd are enabled,
but that's too complicated for this small debug program.
2020-08-14 14:40:39 +02:00
Max Kellermann 36e6079c57 Log: make LogLevel the first parameter
Prepare for templated functions.
2020-07-06 21:07:26 +02:00
Max Kellermann c4efc37ad8 system/ByteOrder: move to util/ 2020-07-01 17:49:57 +02:00
Max Kellermann 3c5ef504f8 test/meson.build: add explicit dependency from run_output on libevent.a
We could exclude that feature if neither ALSA nor httpd are enabled,
but that's too complicated for this small debug program.
2020-07-01 15:26:02 +02:00
Max Kellermann 0cefb61a2e test/meson.build: install GTest from fallback Meson wrap 2020-06-04 14:56:43 +02:00
Max Kellermann b7ab1a9d79 test/meson.build: disable GTest warning "ScopedTrace was marked unused but was used" 2020-06-04 10:32:02 +02:00
Max Kellermann 210c270624 test/test_pcm_export: eliminate zero-length arrays
C++ doesn't allow that.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/875
2020-05-26 16:50:40 +02:00
Max Kellermann 9815d10137 system/FileDescriptor: move to io/ 2020-05-05 14:27:03 +02:00
Max Kellermann 12b97bbe38 release v0.21.22
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl6GCWgQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEvkQD/9qg6cnCgCKSOmTjteJu1ayeXBMDiL3cCCg
 AwarHQoxsB0102NpV+MLka+4HIwHn+WNL55TzYgfbSh0nfmnki2fZ0YpsZoQR79w
 MP11iMPnFH1oKqj58minBkFNmAis2aLYHJGKaQNUh7wcf0WhbVTqtWBUrKb07RQ0
 Zj5lXtg65O/+yaCVdQGS6fMk2t7CqBM+S3RmbXCib/JRMC6aozoC7nWPvj8b2R8d
 PgxwKMRzyslyFoxDQZrusDjJ1piyigzUMMr32yzYDED4Xr8jsEELaJfULbr6qWT2
 ZNYF91e+D5V7riASAtlFTaVMaISx4QbHjKWR5Xcx0q/SJPAXTxF8RrAqGvqpWYmc
 kqmC8iNxQsW5o3sNhI9qg6sOkq2dIu43VasRCvuo19GABR36wwTK5ORoazIi8fbU
 /Ki/oZHtZczHRop9Cd6698Qr9jyTPdIs55FbgejzrVADvAmslqtcA6XxCBuG1nSF
 Qo48dp9Px7J74qNNuDt5/xLnQGJKaW60/BXrMK9G9QG4x9r4zuCayDO6Qc7FMWWR
 DG7k9nYoXJU5YG7xp9Rk+Yj3Ade8kqhTnKfqw0f2JfkLt0ChPG+rZcxICWSdzZm0
 AfHxuEQlwKaaFHFEsZhVehlsXkeU9OVywo+QDzmY2uqQ2ddlBZ47Qm2MWgTsv8i/
 euVsrzLtag==
 =EedX
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.22'

release v0.21.22
2020-04-02 18:02:10 +02:00
Max Kellermann a689b881d3 test/meson.build: work around linker failure due to statically linked CURL 2020-04-02 17:16:05 +02:00
Max Kellermann bad829509e test/ShutdownHandler: add `inline` to work around Windows linker problems 2020-04-02 17:16:05 +02:00
Max Kellermann 9c66b0414a test/*: fix Windows build using class FromNarrowPath 2020-04-02 17:16:05 +02:00
Max Kellermann 62229f14da test/time: add test for LocalTime(), GmTime() 2020-04-01 16:21:29 +02:00
Max Kellermann a4c925c8d7 test/meson.build: move TestTime to time/ 2020-04-01 16:12:01 +02:00
Max Kellermann 60610e90b1 test/net/TestIPv[46]Address: fix Windows build errors 2020-04-01 16:09:24 +02:00
Rosen Penev a5b136c420
test: fix double promotion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 22:56:30 -07:00
Rosen Penev 97425d56e7
remove gcc_unused
[[maybe_unused]] (introduced in C++17) is standard C++.

https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Max Kellermann cefc773992 playlist/PlaylistSong: pass std::string_view 2020-03-13 19:58:36 +01:00
Rosen Penev edc4989d9c
change errno.h to cerrno
The former is deprecated by C++14. It's also functionally the same.

From the standard:

19.4
The header<cerrno>is described in Table 43. Its contents are the same as
the POSIX header<errno.h>,except that errno shall be defined as a macro.
[Note: The intent is to remain in close alignment with the POSIX
standard.] A separate errno value shall be provided for each thread.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:51:16 -07:00
Rosen Penev ab9f5d2067
replace assert.h with cassert
The former was deprecated with C++14.

According to the C++11 and C++17 standards, both files are identical.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Max Kellermann a718086ffb test/run_convert: add option --config 2020-03-12 21:41:39 +01:00
Max Kellermann 8d40e68dec test/run_convert: add option --verbose 2020-03-12 21:41:39 +01:00
Max Kellermann de0affe115 test/run_convert: move code to ParseCommandLine() 2020-03-12 21:40:27 +01:00
Max Kellermann 07e0a31d02 release v0.21.20
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl5Jm2cQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEj3nEACkdgWh02NT0EGpmumCn4cB1mZ78ef0GyGm
 OOJi6qrnfuQdFX89UlL1+Nrx1U4Q6O6XvlIuuWTdKUjRQ+g5ktWuN48uEIKJ38If
 5ZbAqEZOvrH2b2lHNX15v7OvwXeGYK28fBbAjKf7txOJtW86azZ3NTjn4bb2a77B
 cio+Rhj9+fXzx/nBxHGVhLY3OQWQySFTm2Nbaz6zQoQYgm2xZ0htHNsGYKV6nl8I
 2Xt5zPEIlbjqdK9moSL1qyCevLZc7ME1Ha1v45pLwrXeCKlqhr5+6xFe2BEc1+DZ
 NHVmVs4e0GqSnyNTEd8eHXn70lpJ5ZSfrrk/HIHkx0Jk2hoGmAasHIUQViYxBiMN
 LqET7vM9nslrvuHl1Dd7wE66rrkGW6ILYKB7w48Jw00W5BjBtgcEVSj3PoKwchdh
 m4+JNZFJvubrXFKWjuXfRtY3MXsDKfy7lMd0iXDAxjh0YJuC8VGpGwRLL4V2uEzs
 tr2UvWIpjlw96kvvjTDnJp5kjA7D77xomxNkCHmj2/LOsA/bd4ljoCcmX033DBRr
 b7ddcESVcqTYXtMnYSWxmcHqizGjwIAVr7SsRgNbzZzs0/DVNpFAb/tGz3K9DzzF
 vdpm3y5KqdGyVoMAsIZDsxannmxcpivI6iOITAQH5aIRSLN/8ZGzCZ6ucS2GTjwq
 TZUR7iOjVQ==
 =ejSV
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.20'

release v0.21.20
2020-02-16 20:46:13 +01:00
Max Kellermann 140d8547c7 test/run_decoder: add option --seek 2020-02-04 22:19:21 +01:00
Max Kellermann 42eb69f46f test/meson.build: restore -Wno-missing-declarations for GTest
This is still needed for GTest 1.8.0 (Travis / Ubuntu Bionic).
2020-02-04 22:06:51 +01:00
Max Kellermann 6f579ddc95 test/DumpDecoderClient: allow overriding GetCommand() 2020-02-04 21:55:21 +01:00
Max Kellermann 3fc859c42d Merge branch 'v0.21.x' 2020-02-04 16:49:18 +01:00
Max Kellermann f1ad21d2bf test/meson.build: add -Wno-unused-command-line-argument for clang 9+ 2020-02-04 16:35:44 +01:00
Max Kellermann 535a099a27 test/meson.build: drop obsolete gtest warning suppressions 2020-02-04 16:32:13 +01:00
Max Kellermann 72ec641f0d *: use `auto` 2020-02-01 14:02:43 +01:00
Max Kellermann 4f22f4d357 *: use nullptr instead of NULL 2020-02-01 14:02:43 +01:00
Max Kellermann 4c52001a35 *: use defaulted destructors 2020-02-01 13:47:16 +01:00
Max Kellermann faa04966af test/test_pcm_*: use `using` instead of `typedef` 2020-02-01 13:38:55 +01:00
Rosen Penev b64fdae938
[clang-tidy] use override instead of virtual
Found with modernize-use-override

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-01-31 21:27:26 -08:00
Max Kellermann 54d57fdcc2 test/DumpDecoderClient: dump the `seekable` flag 2020-01-25 20:07:09 +01:00
Max Kellermann cd612c4eef AudioFormat: move to pcm/ 2020-01-18 20:24:59 +01:00
Max Kellermann 914ad261ed pcm/meson.build: split libpcm into two
One basic library without dependencies, and one with heavy
dependencies like libsamplerate.
2020-01-18 20:08:23 +01:00
Max Kellermann 7551867249 meson.build: move Log.cxx and LogBackend.cxx into a static library
Prevents compiling those sources many times, once for each debug
program using it.
2020-01-18 19:56:16 +01:00
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +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 087874620f test/RunCurl: new debug program 2019-12-23 14:26:56 +01:00
Max Kellermann 7bfe6a3304 test/run_storage: add command "stat" 2019-12-22 19:54:31 +01:00
Max Kellermann a72878c5b9 io/FileDescriptor: add method FullRead() 2019-12-17 20:21:11 +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 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 63c5d66016 time/ISO8601: support omitting minutes 2019-12-16 23:24:43 +01:00
Max Kellermann d09bd9178f time/ISO8601: support omitting seconds 2019-12-16 23:24:43 +01:00
Max Kellermann 7d8b1860c3 time/ISO8601: support time zone offset 2019-12-16 23:24:43 +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 bbe403f141 test/TestISO8601: unit test for time/ISO8601 2019-12-16 23:24:43 +01:00
Max Kellermann e9af692973 util/Time*: move to time/ 2019-12-16 23:02:14 +01:00
Max Kellermann ed327c597a lib/icu/Converter: Create() returns std::unique_ptr 2019-11-04 15:44:06 +01:00
Max Kellermann d7dbf47a3f time/ISO8601: support omitting minutes 2019-09-25 21:39:25 +02:00
Max Kellermann 9caf90f74f util/UriRelative: add uri_apply_relative() 2019-09-08 00:07:37 +02:00
Max Kellermann 2c3eb5b8ad test/TestUriRelative: new unit test 2019-09-07 23:27:24 +02:00
Max Kellermann f750c8012a test/run_filter: use Filter::Flush() 2019-08-26 21:17:31 +02:00
Max Kellermann b0a04b3da8 test/run_filter: pass ConstBuffer<void> to FullWrite() 2019-08-26 21:17:27 +02:00
Max Kellermann 9617bd6c85 test/run_filter: fix error message 2019-08-26 21:17:26 +02:00
Max Kellermann 2e9b5e4e78 filter/Registry: rename the source file 2019-08-26 20:54:52 +02:00
Max Kellermann f3ed2c0a82 time/ISO8601: support omitting seconds 2019-08-19 22:44:41 +02:00
Max Kellermann 2c35ea92bd time/ISO8601: support time zone offset 2019-08-19 22:44:28 +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 995783bb2f test/TestISO8601: unit test for time/ISO8601 2019-08-19 22:41:54 +02:00
Max Kellermann f909615b14 include cleanups (powered by iwyu) 2019-08-15 17:57:20 +02:00
Max Kellermann 96a1c69c29 tag/Handler: add virtual method OnPicture()
Preparing for https://github.com/MusicPlayerDaemon/MPD/issues/42
2019-08-12 20:31:43 +02:00
Max Kellermann 4a47bbd816 IcyMetadataParser: implement charset conversion 2019-08-10 10:07:13 +02:00
Max Kellermann 7654038d65 util/UriQueryParser: new library 2019-08-09 20:39:34 +02:00
Max Kellermann 40a2880857 util/UriUtil: split 2019-08-09 20:21:12 +02:00
Max Kellermann cde6c46d2f util/Macros: replace with std::size() (C++17) 2019-08-03 13:10:49 +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 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 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 83b0871248 test/test_translate_song: remove unused variable "s1" 2019-07-29 09:52:57 +02:00
Max Kellermann d8aec4b2dc test/run_decoder: catch StopDecoder
This exception is usually thrown by class DecoderBridge, but the Opus
plugin (ab)uses it as well, so we need to catch it.
2019-07-12 17:49:12 +02:00
Max Kellermann 5fa7610264 pcm/Volume: Open() returns output sample format
Prepare for a new mode which may convert to a different sample format
when applying volume, to reduce dithering.
2019-07-05 19:03:00 +02:00
Max Kellermann d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann 4650a903b4 decoder/Bridge: add `noexcept` 2019-07-05 08:57:51 +02:00
Max Kellermann beed004b10 pcm/Export: add GetSilence() 2019-06-26 16:04:46 +02:00
Max Kellermann 730e67d766 test/test_pcm_export: add tests for Get{In,Out}put{Frame,Block}Size() 2019-06-26 16:01:19 +02:00
Max Kellermann bf26adf555 pcm/Dsd{16,32}: stash odd frames away for the next call
Similar to commit 32380d1db0, these are
the final parts for really fixing
https://github.com/MusicPlayerDaemon/MPD/issues/469
2019-06-18 11:19:27 +02:00
Max Kellermann 28e07e900f pcm/Export: convert the DSD bools to an enum
These options are exclusive.
2019-06-17 22:35:00 +02:00
Max Kellermann 32380d1db0 pcm/Dop: stash odd frames away for the next call
First part of the "real" fix for
https://github.com/MusicPlayerDaemon/MPD/issues/469
2019-06-17 22:18:44 +02:00
Max Kellermann e87f0ca771 pcm/Pcm*: drop more "Pcm" prefixes from source file names 2019-06-17 11:17:48 +02:00
Max Kellermann a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann fd5e74dbd0 pcm/Pcm{Dop,Export}: drop "Pcm" prefix 2019-06-16 12:11:44 +02:00
Max Kellermann bd6b7aa88e archive/Lookup: move to fs/LookupFile.cxx
This can be used for other purposes as well.
2019-06-15 14:26:26 +02:00
Max Kellermann fcf6415963 archive/Lookup: pass class Path 2019-06-15 14:06:50 +02:00
Max Kellermann be79b44dc8 archive/Lookup: pass const pointer 2019-06-15 14:04:34 +02:00
Max Kellermann 17f207ffd1 archive/Lookup: return AllocatedPath 2019-06-15 13:57:28 +02:00
Max Kellermann 548aa00111 tag/Handler: pass StringView to OnTag() and OnPair()
Eliminates a number of allocations, because callers don't need to copy
the strings to a newly allocated buffer only to null-terminate them.
And most callers don't need to have a null-terminated string.
2019-06-06 13:00:53 +02:00
Max Kellermann 71f9332bd3 test/TestCircularBuffer: add `constexpr` to fix -Wvla 2019-06-06 12:40:32 +02:00
Max Kellermann e1ac377812 archive/ArchiveLookup: replace output parameters with a struct 2019-05-31 19:56:25 +02:00
Max Kellermann 12e75a523a archive/ArchiveLookup: remove "suffix" output parameter
Let the caller do this.  Our GetSuffix() function was broken anyway.
2019-05-31 19:01:22 +02:00
Max Kellermann fa13648f2c archive/ArchiveLookup: throw on error 2019-05-31 18:52:11 +02:00
Max Kellermann 7739b3960c mixer/Listener: add `noexcept` 2019-05-31 14:09:47 +02:00
Max Kellermann 971450f0d4 input/InputStream: make IsEOF() and IsAvailable() const 2019-05-29 13:31:54 +02:00
Max Kellermann e0d5d88104 Log: make LogLevel the first parameter
Prepare for templated functions.
2019-05-23 12:17:59 +02:00
Max Kellermann 9a78371b5c DetachedSong: allow LoadFile(), Update() to throw 2019-05-22 10:19:25 +02:00
Max Kellermann 214ddee2f5 util/Time*: move to time/ 2019-05-08 15:47:58 +02:00
Max Kellermann 973c87b351 event/Call, ...: use wait() with predicate 2019-05-07 20:01:45 +02:00
Max Kellermann 1b5c1f75a4 input/InputStreams: pass std::unique_lock<> to various methods 2019-05-07 19:09:39 +02:00
Max Kellermann 92022658f9 thread/Cond: add wait() overload which takes a unique_lock<>
Just like std::condition_variable, which however has no way to specify
the std::mutex directly.
2019-04-26 11:51:45 +02:00
Max Kellermann b51bae5500 thread/*Cond: rename methods to match std::condition_variable 2019-04-25 19:46:43 +02:00
Max Kellermann c7c303eec3 db/DatabaseListener: add `noexcept` 2019-04-24 14:57:30 +02:00
Max Kellermann a30af2ba42 lib/chromaprint/DecoderClient: replace method PrintResult() 2019-04-05 13:40:05 +02:00
Max Kellermann 8006911a1f decoder/Client: add `noexcept` 2019-04-05 09:03:42 +02:00
Max Kellermann e78d825059 pcm/PcmConvert: eliminate Open() and Close()
Let the constructor and destructor do this.  This means that all users
have to be converted to allocate PcmConvert dynamically.
2019-04-04 21:01:08 +02:00
Max Kellermann 8a07724b23 test/RunChromaprint: move class ChromaprintDecoderClient to lib/chromaprint/ 2019-04-04 20:29:27 +02:00
Max Kellermann 5256929b17 tag/Chromaprint: move to lib/chromaprint/Context.hxx 2019-04-04 20:21:10 +02:00
Max Kellermann 93d91936b5 test/run_filter: check for partial writes 2019-03-25 08:59:34 +01:00
Max Kellermann 2220383d83 test/run_filter: move code to WriteOrThrow() 2019-03-25 08:59:25 +01:00
Max Kellermann 3231706628 test/run_filter: use class FileDescriptor 2019-03-25 08:53:58 +01:00
Max Kellermann 977a4570d9 Merge branch 'v0.21.x' 2019-03-21 11:49:41 +01:00
Max Kellermann 6bab3bcfea test/RunChromaprint: add missing `override` 2019-03-20 13:30:13 +01:00
Max Kellermann a66097129d Merge branch 'v0.21.x' 2019-03-16 14:08:22 +01:00
Max Kellermann 52ce39dc3e test/TestSongFilter: unit test for song filters
A few of those tests fail due to bugs.
2019-03-16 13:23:02 +01:00
Max Kellermann 7a3e15d8e5 test/meson.build: add section for filter tests 2019-03-16 13:23:02 +01:00
Max Kellermann cf66a60c60 test/MakeTag: add `noexcept` 2019-03-16 13:23:02 +01:00
Max Kellermann 9b26d451e4 test/MakeTag: remove `static` 2019-03-16 13:23:02 +01:00
Max Kellermann 137ffba1b4 test/test_translate_song: move MakeTag() to header 2019-03-16 13:23:02 +01:00
Max Kellermann 1a0865da7a test/run_filter: ensure that partial frames will not get passed to the filter 2019-03-14 14:26:53 +01:00
Max Kellermann a6ecf6c992 test/run_filter: move the buffer into the loop 2019-03-14 13:57:37 +01:00
Max Kellermann c176d94598 system/ByteOrder: move to util/ 2019-03-08 10:21:10 +01:00
Max Kellermann 6c28adbcd2 db/Plugin: use std::unique_ptr<> to manage Database pointers 2019-02-20 20:43:31 +01:00
Max Kellermann e9c45a9140 playlist/Registry: add RAII class 2019-02-05 23:03:29 +01:00
Max Kellermann 7a23c123c8 decoder/List: add RAII class 2019-02-05 22:12:22 +01:00
Max Kellermann 9e73ea77b4 input/Init: add RAII class 2019-02-05 22:07:49 +01:00
Max Kellermann b0739eca87 test/ConfigGlue: merge duplicate code from various debug programs 2019-02-05 21:56:20 +01:00
Max Kellermann c9ba4f3f9c archive/List: add RAII class 2019-02-05 21:40:07 +01:00
Max Kellermann 48ec09ab1e test/net/TestIPv4Address: make literal unsigned to work around -Wsign-compare 2019-01-21 14:39:24 +01:00
Max Kellermann 6a68e1c3f3 test/net/TestIPv6Address: work around failure on macOS 2019-01-21 12:13:52 +01:00
Max Kellermann 85f77ec81d test/net/TestLocalSocketAddress: can't use strcmp() if the string isn't null-terminated. 2019-01-21 12:12:36 +01:00
Max Kellermann 2cc2bab309 test/net: new unit tests 2019-01-20 21:05:21 +01:00
Max Kellermann ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Volodymyr Medvid 04f632296f
test/meson.build: run_storage depends on event lib
test/run_storage.cxx depends on EventThread/EventLoop from libevent.a.
Depend on it explicitly. This addresses build failure with
-Dtest=true -Dcurl=disabled -Ddbus=disabled
2018-11-15 19:01:43 +02:00
Max Kellermann 96ae0ec93a remove some autotools remains
Closes #396
2018-11-02 18:55:49 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann bb5918932b pcm/PcmUtils: rename to Clamp.hxx 2018-10-30 00:05:58 +01:00
Max Kellermann c92f0a1336 test/PcmFormat: add Float/32 bit test 2018-10-29 23:06:40 +01:00
Max Kellermann 8463441afe test/PcmFormat: rename FormatFloat to FormatFloat16 2018-10-29 23:06:37 +01:00
Max Kellermann 30e22b753b tag/Chromaprint: OO wrapper for a ChromaprintContext 2018-10-24 10:52:45 +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 224400074c player/CrossFade: use std::chrono::duration 2018-09-22 19:37:02 +02:00
Max Kellermann 90f4e97751 decoder/Client: use std::chrono::duration<double> instead of raw `double` 2018-09-21 20:42:34 +02:00
Max Kellermann 68f824a186 protocol/ArgParser: move struct RangeArg to separate header 2018-09-02 08:17:22 +02:00
Max Kellermann 4a1e885c0a net/Resolver: replace with more advanced implementation
The new implementation is copied from another project and is
BSD-licensed.  It is exception-safe and can parse IPv6 scope ids with
interface names.
2018-08-21 08:26:12 +02:00
Max Kellermann ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann 4accc1f159 test/run_neighbor_explorer: allocate ConfigData on the stack 2018-08-19 22:41:58 +02:00
Max Kellermann 80839b5372 test/run_input: allocate ConfigData in class GlobalInit 2018-08-19 22:41:08 +02:00
Max Kellermann dafa3f985a test/run_decoder: allocate ConfigData in class GlobalInit 2018-08-19 22:40:36 +02:00
Max Kellermann f865e1393c test/dump_rva2: remove obsolete fake function config_get_string() 2018-08-19 22:39:22 +02:00
Max Kellermann c99416fbe0 test/dump_playlist: allocate ConfigData on the stack 2018-08-19 22:36:52 +02:00
Max Kellermann 3caef29b93 test/DumpDatabase: allocate ConfigData on the stack 2018-08-19 22:34:10 +02:00
Max Kellermann 027e562f65 song/OptimizeFilter: optimization stage for filters 2018-08-02 19:42:53 +02:00
Max Kellermann 90201e9970 DetachedSong, db/LightSong, SongFilter: move to src/song/ 2018-08-02 13:51:18 +02:00
Max Kellermann a174159496 test/ParseSongFilter: new debug program 2018-07-24 23:04:47 +02:00
Max Kellermann 32290d5eb8 fs/Path: add method ToUTF8Throw() 2018-07-18 16:51:29 +02:00
Max Kellermann 49efb6071c config/Migrate: library to migrate deprecated settings 2018-07-18 10:25:02 +02:00
Max Kellermann 1b4181d983 test/DumpDatabase: use struct ConfigData 2018-07-17 23:41:37 +02:00
Max Kellermann 4f678aa244 neighbor/Glue: use struct ConfigData 2018-07-17 23:11:33 +02:00
Max Kellermann 24a86dce21 tag/Config: use struct ConfigData 2018-07-17 22:34:11 +02:00
Max Kellermann f18695eb45 test/run_output: use struct ConfigData 2018-07-17 22:12:56 +02:00
Max Kellermann d6b0ecac1b test/run_filter: use struct ConfigData 2018-07-17 22:11:57 +02:00
Max Kellermann 61a119b607 playlist/Registry: use struct ConfigData 2018-07-17 22:10:32 +02:00
Max Kellermann ea5096ac90 test/read_conf: use struct ConfigData 2018-07-17 22:08:48 +02:00
Max Kellermann 428c2ec0e3 test/read_conf: throw if setting is not configured 2018-07-17 22:08:08 +02:00
Max Kellermann 1a82981d07 test/read_conf: validate the setting name early 2018-07-17 22:07:05 +02:00
Max Kellermann 0ff0aca2e2 input/Init: use struct ConfigData 2018-07-17 22:05:27 +02:00
Max Kellermann 57d77cc8a0 decoder/List: use struct ConfigData 2018-07-17 22:05:21 +02:00
Max Kellermann d6529d8c60 test/*: catch and print all exceptions 2018-07-17 21:58:39 +02:00
Max Kellermann af33a9f4b8 config/Block: allow moving name and value 2018-07-17 20:27:46 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann e152e843d8 tag/Handler: add method OnAudioFormat() 2018-07-06 12:44:58 +02:00
Max Kellermann 3d3a1232b1 tag/Handler: convert to class with virtual methods 2018-07-05 19:07:05 +02:00
Max Kellermann d0fbf6db59 input/Stream: remove attribute "cond", replace with handler interface
This adds a bit of overhead, but also adds flexibility to the API,
because arbitrary triggers may be invoked from that virtual method
implementation, not just Cond::signal().

The motivation for this is to make the handlers more dynamic, for the
upcoming buffering class utilizing ProxyInputStream.
2018-06-22 19:37:18 +02:00
Max Kellermann 01d8eb6290 input/rewind: move sources out of the "plugins" directory
This is not a plugin.
2018-06-22 19:31:06 +02:00
Max Kellermann 0150131984 test/run_neighbor_explorer: make GlobalInit const 2018-06-04 17:44:31 +02:00
Max Kellermann 2ddd45e5e1 test/run_neighbor_explorer: use ShutdownHandler to catch SIGINT/SIGTERM 2018-06-04 17:42:47 +02:00
Max Kellermann acd61a0e8e test/run_neighbor_explorer: dump NeighborGlue::GetList() after initialization 2018-06-02 19:15:36 +02:00
Max Kellermann b30a510b45 release v0.20.18
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlqR3zoQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEqNGEACGhsZJbhqls0EawfHhpOz/x7JcloMLWvoX
 GzuvVinhdFmmFId0akLsg3TCyGElNA+4YzfDjB1TyMpPFBUxM/nnthYPrSmjiT68
 t+0IV6OnqFVLE2PF6pHV2Gia0Km746GZBJ+TRLeZSIksADH7nU+soepIA6idwNRN
 x8Wo0ashsRIPG3FyL6f/2W/vUvD/enoxohCBB/tvnZ73Px0k2bYAwlBNW/i9/yrX
 ktJ2yJqbCkKOhBQnbUvsG72Nrd4/Iz2m7cA//KBVrDEGwNv5hxNKiK/hCq3YK2W9
 Ndnl0+EQxNLT1NUwF5e1LS3GtU2Mh3FQwrcq81Cj7o/wEH5e7piKBZhwDCBgOYYH
 vLbaLYWK+XW/EqitkRZx5ZBrfNoqOrLreX0d2+AZJOjKDjAWgMZXoOEjmQC9/Dcj
 pGcRow4jAusBRJKVN0Wmu6eeVQMjiYJNWehhyhhruShHL2ZAjJSuDhygAFW5YB3I
 N2kfhwZWMHVFpA0HvcVx5JwNx7U1OyJGs0lRGThV/6jhnklGzoujvomRNJ6VNx10
 ppYhmcLaHm19GR1eb8KCYnZYL2QWoQT5YLVlm0vybTX9i1k3wdf9ezU/n5hB52rP
 j20Ol1I9YQw4/L985SV1W+8ll1i71o9paoJx17C8AQpxWWamQLe+vgENt9fPKIPl
 aLBYU7hq9Q==
 =ndLr
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.18'

release v0.20.18
2018-02-24 23:16:06 +01:00
Max Kellermann f3e683bd6f test/run_storage: fallback for %F on Windows 2018-02-24 22:44:42 +01:00
Max Kellermann 50ce0c0d9d test/run_storage: initialize WinSock 2018-02-24 22:44:34 +01:00
Max Kellermann 03700ad37c test/DumpDecoderClient: use STDOUT_FILENO 2018-02-17 08:33:01 +01:00
Max Kellermann 6d01ee9284 test/DumpDecoderClient: convert static local to class attribute 2018-02-17 08:32:16 +01:00
Max Kellermann cc3c1f31d0 test/DumpDecoderClient: convert to class 2018-02-17 08:31:19 +01:00
Max Kellermann 5909502a13 test/DumpDecoderClient: add API documentation 2018-02-17 08:30:12 +01:00
Max Kellermann 88bbd847e0 test/FakeDecoderAPI: rename to DumpDecoderClient 2018-02-17 08:27:03 +01:00
Max Kellermann 0c300bd4b4 test/run_decoder: add command-line option to read mpd.conf 2018-02-13 00:00:00 +01:00
Max Kellermann 53acb7bfcb test/run_decder: RAII-style global initialization 2018-02-13 00:00:00 +01:00
Max Kellermann 005bb59797 test/run_input: move code from Scan() to input/ScanTags.cxx 2018-01-29 16:57:44 +01:00
Max Kellermann 3ecf5fd442 test/run_input: add frontend for InputPlugin::scan_tags() 2018-01-26 20:08:01 +01:00
Max Kellermann 3461580b34 test/run_input: add option "--verbose" 2018-01-24 15:29:30 +01:00
Max Kellermann fcfdeac1c7 test/test_translate_song: use std::to_string() 2018-01-24 13:38:44 +01:00
Max Kellermann 8b42fd0a28 Merge branch 'v0.20.x' 2018-01-23 16:45:57 +01:00
Max Kellermann ea66cdd6a5 test/read_mixer: another kludge to work around -Wnull-dereference 2018-01-23 16:42:25 +01:00
Max Kellermann f762e8034f test/NullMixerListener: new class to fix -Wnull-dereference 2018-01-23 16:28:56 +01:00
Max Kellermann 1e3f0650df SongUpdate: add "noexcept" 2018-01-21 11:53:42 +01:00
Max Kellermann 61eb2aa328 storage/Interface: wrap StorageDirectoryReader in std::unique_ptr 2018-01-21 11:04:30 +01:00
Max Kellermann 0095e2d7d8 playlist/Plugin: use std::unique_ptr<SongEnumerator> 2018-01-20 19:59:42 +01:00
Max Kellermann eef5b58211 tag/Tag: add "noexcept" 2018-01-20 19:39:46 +01:00
Max Kellermann c4f7740b80 fs/Path: replace method Null() with nullptr_t constructor 2018-01-17 12:16:21 +01:00
Max Kellermann 6c239f7a00 test/run_input: add option to load a configuration file 2018-01-17 12:09:08 +01:00
Max Kellermann 7d5b859756 test/run_input: add command-line option parser 2018-01-17 12:04:01 +01:00
Max Kellermann 8649ea3d6f thread/Thread: use BoundMethod 2018-01-07 17:20:26 +01:00
Max Kellermann 6d0d8cf9cf filter/Filter: add virtual method Flush()
This will be used by filters which have internal buffers which need to
be flushed at the end, e.g. the "soxr" resampler.
2018-01-02 23:15:51 +01:00
Max Kellermann bbabb7a14c filter/Plugin: move filter_configured_new() to LoadOne.cxx 2018-01-02 23:06:53 +01:00
Max Kellermann cd6de3b24e neighbor/{Explorer,Listener}: add "noexcept" 2018-01-02 16:58:14 +01:00
Max Kellermann 3c5e4e2788 storage/Plugin: return std::unique_ptr<Storage> 2018-01-02 16:11:17 +01:00
Max Kellermann 10537c5095 test/run_filter: use "auto" 2018-01-01 19:06:17 +01:00
Max Kellermann 551ac56a33 Filter/Internal: split header 2018-01-01 18:48:34 +01:00
Max Kellermann a2c2288cd6 test/run_filter: throw exception on error 2017-12-27 12:03:13 +01:00
Max Kellermann e2621d5e44 filter/Plugin: return std::unique_ptr<PreparedFilter> 2017-12-27 11:39:01 +01:00
Max Kellermann 2e0949d8e6 archive/Plugin: return std::unique_ptr<ArchiveFile> 2017-12-27 09:07:21 +01:00
Max Kellermann 49619fbd77 input/Proxy: use InputStreamPtr 2017-12-26 20:03:37 +01:00
Max Kellermann 9aec2f019a archive/File: eliminate Close(), make destructor virtual instead 2017-12-22 16:30:17 +01:00
Max Kellermann 73e69edac3 input/InputStream: ReadTag() returns std::unique_ptr<Tag> 2017-12-20 15:22:18 +01:00
Max Kellermann cb3042ffb2 tag/Builder: CommitNew() returns std::unique_ptr<Tag> 2017-12-20 14:55:25 +01:00
Max Kellermann d293aaf945 test/test_icy_parser: use AtScopeExit() 2017-12-20 14:54:56 +01:00
Max Kellermann 914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01:00
Max Kellermann 6246d36fe6 Merge branch 'v0.20.x' 2017-12-16 20:56:06 +01:00
Max Kellermann dfaf08743c *: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
2017-12-12 10:22:20 +01:00