Commit Graph

14472 Commits

Author SHA1 Message Date
Max Kellermann a491d8ae24 decoder/mad: use class UniqueId3Tag 2018-10-22 09:44:50 +02:00
Max Kellermann 3cd5dd15f8 decoder/mad: don't initialize xing::frames 2018-10-22 09:44:48 +02:00
Max Kellermann 562ae44d38 decoder/mad: remove unused attribute from xing::magic 2018-10-22 09:44:46 +02:00
Max Kellermann 92541dedc0 Merge branch 'master' of git://github.com/skidoo23/MPD 2018-10-22 09:44:36 +02:00
Max Kellermann 650a67dc38 decoder/mad: use mad_bit_skip() where appropriate 2018-10-19 20:24:16 +02:00
Max Kellermann c63f24e58e decoder/audiofile: larger stack buffer to reduce overhead 2018-10-19 20:04:28 +02:00
Max Kellermann 3be8b02cc2 decoder/sndfile: make vio constexpr
Use `const_cast` to be able to pass it to sf_open_virtual() which has
a wrong parameter declaration.
2018-10-19 19:51:17 +02:00
Max Kellermann bdfaea0c25 decoder/mad: move parse_id3_mixramp() to src/tag/Id3ReplayGain.cxx 2018-10-19 19:45:32 +02:00
Max Kellermann ed5c0d6546 tag/Id3Scan: make struct id3_tag pointers const 2018-10-19 19:43:03 +02:00
Max Kellermann 86dc621086 tag/Rva2: make struct id3_tag pointers const 2018-10-19 19:41:59 +02:00
skidoo23 fbea965c70 tag: new tag Label 2018-10-17 20:33:03 +02:00
Max Kellermann eefc0f5d80 input/Error: add noexcept 2018-10-16 21:26:04 +02:00
skidoo23 69749eb591 decoder/sidplay: fix typo to avoid linker error with meson (libsidplayfp) 2018-10-16 14:56:40 +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
skidoo23 f80ebf68b0 decoder/wavpack: fix warning 'unused variable is_dsd' when compiled with --enable-dsd=no 2018-10-12 01:02:34 +02:00
Max Kellermann 1155a29096 Merge branch 'cdda_set_cdspeed' of git://github.com/andrewbasterfield/MPD 2018-10-08 21:16:52 +02:00
Max Kellermann 030e603940 decoder/gme: fix include
Broken since commit 08f77c2b60
2018-10-07 22:33:52 +02:00
Andrew Basterfield 9c1bf9ac5f Remove some extraneous leftover debugging 2018-10-07 19:21:38 +01:00
Andrew Basterfield 2f07b8f482 Set cdrive speed hint for cdparanoia 2018-10-06 20:18:19 +01:00
Max Kellermann 6c40a27809 db/update/ExcludeList: fix variable name in #else block 2018-10-01 08:40:53 +02:00
Max Kellermann 8736a3533b db/update/ExcludeList: add missing #ifdef 2018-10-01 08:40:15 +02:00
Max Kellermann 608d232373 util/SliceBuffer: re-add line which got lost in the last commit 2018-09-23 19:33:34 +02:00
Max Kellermann 1702e98fdf util/SliceBuffer: move code to DiscardMemory() 2018-09-23 19:15:28 +02:00
Max Kellermann 2ec94c0497 player/Control: start thread on demand
Keep MPD's footprint small until playback is requested.
2018-09-23 17:32:34 +02:00
Max Kellermann bf372e3e1f player/Control: move public methods up 2018-09-23 17:28:41 +02:00
Max Kellermann 0d971963fd player/Control: make several methods private 2018-09-23 17:27:42 +02:00
Max Kellermann 287cff40b9 player/Control: remove Lock(), Unlock() 2018-09-23 17:27:42 +02:00
Max Kellermann 0e0bc7976f player/Control: add LockGetSyncInfo() 2018-09-23 17:17:57 +02:00
Max Kellermann 8c638c50a3 player/Thread: remove obsolete buffered_before_play attribute 2018-09-23 16:50:04 +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 c1600bcf3d player/Thread: copy buffered_before_play 2018-09-23 15:46:27 +02:00
Max Kellermann a82d864c91 config/File: print warning about deprecated options 2018-09-23 15:43:38 +02:00
Max Kellermann dcac32a6c4 AudioFormat: add implicit cast to duration::rep
Fixes integer truncation bugs (closes #359).
2018-09-23 15:15:53 +02:00
Max Kellermann 5286477f73 Chrono: remove unnecessary typedef rep
It is already inherited by the base class, and we don't need to import
it explicitly.
2018-09-23 15:15:18 +02:00
Max Kellermann 2f3845ef51 player/Thread: remove buffered_before_play from decoder_wakeup_threshold formula
Simplify the formula, and I guess this makes the formula more
reliable.  Imagine somebody configured `buffered_before_play` larger
than 25%; then the decoder would be woken up all the time.  This
doesn't seem logical.  On the other hand, it's easy to understand that
the decoder should be woken up below 75% buffer fill.
2018-09-23 15:00:47 +02:00
Max Kellermann 1191025bbf player/Thread: add attribute decoder_wakeup_threshold
Calculate the value only once.
2018-09-22 19:56:00 +02:00
Max Kellermann bfd261929e AudioFormat: remove obsolete method GetTimeToSize() 2018-09-22 19:39:20 +02:00
Max Kellermann 84de88841b player/CrossFade: use AudioFormat::SizeToTime() instead of GetTimeToSize() 2018-09-22 19:37:45 +02:00
Max Kellermann 224400074c player/CrossFade: use std::chrono::duration 2018-09-22 19:37:02 +02:00
Max Kellermann 863722545f player/CrossFade, ...: use lround() 2018-09-22 19:08:03 +02:00
Max Kellermann d3d1d37782 AudioFormat: add TimeToSize(), SizeToTime() 2018-09-21 20:51:08 +02:00
Max Kellermann 1a2012a97e player/Control: convert total_play_time to FloatDuration 2018-09-21 20:50:15 +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 d1bcd98f79 Chrono: add FloatDuration 2018-09-21 20:42:30 +02:00
Max Kellermann 39542de69d Chrono: add static method Cast() 2018-09-21 20:41:23 +02:00
Max Kellermann 1d00d55d53 player/Thread: stop buffering if buffer is full
Shouldn't ever happen, but who knows...
2018-09-21 19:05:25 +02:00
Max Kellermann a190db0873 player/Thread: simplify loop condition 2018-09-21 18:58:38 +02:00
Max Kellermann e3142312bb player/Control: convert to class 2018-09-21 18:12:28 +02:00
Max Kellermann e5d1ac0bd0 player/Thread: move functions into PlayerControl 2018-09-21 18:09:14 +02:00
Max Kellermann c0411fa412 decoder/Thread: add noexcept 2018-09-21 17:58:34 +02:00