Commit Graph

15037 Commits

Author SHA1 Message Date
Max Kellermann 4b0444e760 Merge remote-tracking branches 'neheb/uniq', 'neheb/bool', 'neheb/loop', 'neheb/bool2', 'neheb/perf', 'neheb/void' and 'neheb/value' 2020-02-02 16:22:19 +01:00
Rosen Penev ecad6d936a
[clang-tidy] pass by value where appropriate
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:53:44 -08:00
Rosen Penev 568deefd68
[clang-tidy] remove pointless void arg
Found with modernize-redundant-void-arg

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:52:38 -08:00
Rosen Penev 40d0420648
[clang-tidy] convert several loops to const auto&
Found with performance-for-range-copy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:49:17 -08:00
Rosen Penev afb29942b0
[clang-tidy] simplify boolean expressions
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:47:47 -08:00
Rosen Penev 15fa780c99
[clang-tidy] convert several loops to range based ones
Found with modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:46:50 -08:00
Rosen Penev 9db3809c7b
[clang-tidy] use bool literals where appropriate
Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:45:33 -08:00
Rosen Penev dfed9546aa
[clang-tidy] replace std::bind with lambdas
Found with modernize-avoid-bind

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:43:01 -08:00
Rosen Penev 469cd9582f
[clang-tidy] use make_unique
Found with modernize-make-unique

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:40:39 -08:00
Max Kellermann bc6eca2115 *: add `explicit` 2020-02-01 14:02:43 +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
Max Kellermann 302eff0a59 decoder/{vorbis,mpcdec}: use `using` instead of `typedef` 2020-02-01 13:38:43 +01:00
Max Kellermann bcc4e97c60 pcm/PcmFormat: use `using` instead of `typedef` 2020-02-01 13:38:19 +01:00
Max Kellermann 4968dd4faa pcm/Dither: use `using` instead of `typedef` 2020-02-01 13:38:00 +01:00
Max Kellermann 0896f44455 util/Domain: add `noexcept` 2020-02-01 13:25:57 +01:00
Max Kellermann 620872390b util/Exception: move the forwarded std::exception_ptr 2020-02-01 13:13:08 +01:00
Max Kellermann f7c326dbeb net/StaticSocketAddress: make the cast operators `constexpr` 2020-02-01 11:49:55 +01:00
Max Kellermann 50de3a7886 net/AddressInfo: add MakeAddrInfo() 2020-02-01 11:48:15 +01:00
Max Kellermann 36cad54ccd util/TemplateString: remove stray semicolon 2020-02-01 11:46:06 +01:00
Max Kellermann 5ad6e7fec5 decoder/{audio,snd}file: handle MIME type "audio/wav" 2020-02-01 11:26:57 +01:00
Rosen Penev 0bb943ba3e FfmpegDecoderPlugin: add WAV support 2020-02-01 11:24:51 +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
Rosen Penev 80a0cf694f MadDecoderPlugin: fix bad printf format
max_frames is size_t, not unsigned long. Fixes GCC warning.
2020-01-31 21:21:39 +01:00
Max Kellermann 0b2444450f decoder/ogg: improve seeking accuracy using binary search
On some VBR files, the single-step interpolation was very inaccurate
and inacceptable.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/720
2020-01-31 19:35:35 +01:00
Max Kellermann faf149d08e lib/xiph/OggVisitor: add method ReadGranulepos() 2020-01-31 19:32:38 +01:00
Max Kellermann e01bbad7bb lib/xiph/OggVisitor: update the OggStreamState offset 2020-01-31 19:24:41 +01:00
Max Kellermann 7e3eaa5921 lib/xiph/OggSyncState: keep track of the Reader offset 2020-01-31 19:24:34 +01:00
Max Kellermann 6fe4068c8e decoder/ogg: move code to SeekByte() 2020-01-31 19:24:26 +01:00
Max Kellermann 8472135859 decoder/ogg: remove unimplemented Seek() declaration 2020-01-31 19:20:52 +01:00
Max Kellermann 0c9e25b3c4 NEWS: add missing line 2020-01-25 20:09:16 +01:00
Max Kellermann 943a67c805 decoder/ogg: need to sync small files while looking for EOS
When calling OggSeekFindEOS() from inside a OggVisitor callback, then
the #InputStream may be in the middle of an Ogg packet, and the newly
initialized #ogg_sync_state will not be able to load it without the
help of ogg_sync_pageseek().  By passing "synced=false" to
OggSeekFindEOS(), we force the use of ogg_sync_pageseek() even when
not actually seeking.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/719
2020-01-25 20:07:11 +01:00
Max Kellermann 881d91f86b lib/xiph/OggFind: add parameter "synced" 2020-01-25 20:07:10 +01:00
Max Kellermann 54d57fdcc2 test/DumpDecoderClient: dump the `seekable` flag 2020-01-25 20:07:09 +01:00
Max Kellermann f6f30d6d64 increment version number to 0.21.20 2020-01-25 20:06:58 +01:00
Max Kellermann 1e07d15428 output/Control: add missing nullptr check to LockRelease() 2020-01-20 17:34:38 +01:00
Max Kellermann cc7f66822e command/partition: add command "delpartition" 2020-01-20 14:56:31 +01:00
Max Kellermann 9cbfa66886 command/partition: don't create null output in new partitions
No output at all is fine.  If the partition needs an output, it must
be moved there, but having just a null output isn't helpful.
2020-01-20 14:55:10 +01:00
Max Kellermann 4df98466df output/multiple: add "client" field, replacing the "client" parameter
By eliminating GetAnyClient(), we can have instances with no outputs
at all.
2020-01-20 14:51:08 +01:00
Max Kellermann ff2e584bde
Create FUNDING.yml 2020-01-20 14:30:52 +01:00
Max Kellermann 49309b419f Partition: add a local idle_monitor
Make idle events per-partition, but leave Instance::EmitIdle() and its
underlying idle_monitor which broadcasts idle events to all
partitions.
2020-01-20 13:33:01 +01:00
Max Kellermann 879bafb837 Instance: move OnIdle() to Instance.cxx 2020-01-20 13:32:43 +01:00
Max Kellermann 6fcea2d484 Instance: move code to OnStateModified() 2020-01-20 13:28:00 +01:00
Max Kellermann 5d597a3646 Instance: manage StateFile with std::unique_ptr 2020-01-20 13:25:19 +01:00
Max Kellermann 56eaf000a4 Partition: add client list
For efficient traversal within one partition, e.g. for distributing
partition-local idle events.
2020-01-20 13:16:13 +01:00
Max Kellermann 77271ebc1f Partition,Instance: add EmitIdle() documentation 2020-01-20 12:50:48 +01:00
Max Kellermann fd2b2cf0bc command/message: make messages/subscriptions local to the current partition 2020-01-20 12:47:57 +01:00
Max Kellermann 438a6d7595 client/Client: make several getter methods const 2020-01-20 12:47:57 +01:00