Commit Graph

34 Commits

Author SHA1 Message Date
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
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann d3d1d37782 AudioFormat: add TimeToSize(), SizeToTime() 2018-09-21 20:51:08 +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 debdf9bb96 decoder/{Thread,Control,...}: rename source files, drop prefix 2018-09-21 17:01:24 +02:00
Max Kellermann 90201e9970 DetachedSong, db/LightSong, SongFilter: move to src/song/ 2018-08-02 13:51:18 +02:00
Max Kellermann 2be905b2e2 MusicPipe: eliminate the unused MusicBuffer reference
This requires re-adding the reference to struct DecoderControl, which
was removed recently by commit
9f14e7a98d
2018-06-23 18:36:24 +02:00
Max Kellermann 54d295c247 MusicChunkPtr: managed MusicChunk pointer
Make all uses of MusicChunk safe.
2018-06-22 23:11:52 +02:00
Max Kellermann 9f14e7a98d MusicPipe: add MusicBuffer reference
This tiny amount of overhead allows omitting the MusicBuffer in
Clear().
2018-06-22 22:59:44 +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 60efdce5ff Merge branch 'v0.20.x' 2018-02-17 13:37:03 +01:00
Max Kellermann 986ec877b0 decoder/Bridge: truncate last chunk at the exact end_time
Instead of passing whole chunks to the MusicPipe and checking the
end_time after each chunk, truncate the last chunk if it would exceed
the end_time.  This requires keeping track of the absolute PCM frame
number.

This fixes a problem with gapless CUE song transitions: a small part
of the following song was always played twice.

Closes #113
2018-02-17 13:10:00 +01:00
Max Kellermann 9f33c6fe03 decoder/Bridge: use std::unique_ptr<Tag> 2017-12-20 15:24:41 +01:00
Max Kellermann 73e69edac3 input/InputStream: ReadTag() returns std::unique_ptr<Tag> 2017-12-20 15:22:18 +01:00
Max Kellermann 25fa3ccade MusicChunk, player/Thread: use std::unique_ptr<Tag> 2017-12-20 15:02:14 +01:00
Max Kellermann c6a95395b5 tag/Tag: Merge() returns std::unique_ptr<Tag> 2017-12-20 14:59:51 +01:00
Max Kellermann 914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01:00
Max Kellermann 49784513b1 util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL 2017-11-10 19:24:33 +01:00
Max Kellermann a057b4f6d8 *: add lost of "noexcept" specifications 2017-06-04 12:46:48 +02:00
Max Kellermann 71f0ed8b74 *: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann 39114f91a7 AudioFormat: replace struct audio_format_string with class StringBuffer, return it 2017-01-17 22:18:21 +01:00
Max Kellermann 7a3a793a12 decoder/Bridge: call PcmConvert::Reset() after seeking 2017-01-11 15:32:57 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann 2e182e84c3 thread/Mutex: remove ScopeLock, use std::lock_guard directly 2017-01-03 07:11:57 +01:00
Max Kellermann b3723274f7 decoder/Bridge: move code to DecoderControl::SetReady() 2016-12-03 14:20:51 +01:00
Max Kellermann 9fb7cc796b decoder/Control: add attribute configured_audio_format
Obsoletes the same variable from AudioConfig.cxx.
2016-12-03 14:12:08 +01:00
Max Kellermann ee57c3490a {decoder,player}/Control: add ReplayGain{Config,Mode} attributes
Don't use the global variables in class DecoderBridge; instead,
forward these values to the decoder thread via PlayerControl and
DecoderControl.
2016-11-25 12:51:55 +01:00
Max Kellermann 77c1f54876 ReplayGainConfig: add struct ReplayGainConfig, move globals to ReplayGainGlobal.cxx 2016-11-25 11:13:08 +01:00
Max Kellermann 5f396e824f ReplayGainMode: convert to strictly-typed enum 2016-11-24 17:34:57 +01:00
Max Kellermann 09c3cc58e4 ReplayGainInfo: add method Get() 2016-11-24 17:34:57 +01:00
Max Kellermann 114fcee2ae decoder/Client: add virtual method Read() 2016-11-21 22:43:09 +01:00
Max Kellermann b488204093 decoder/API: move DecoderBridge methods to Bridge.cxx 2016-11-21 22:14:09 +01:00
Max Kellermann 2718f4c333 decoder/API: move part of decoder_check_cancel_read() into class DecoderBridge 2016-11-21 22:07:03 +01:00
Max Kellermann 697c3f8cb9 decoder/Internal: rename struct Decoder to class DecoderBridge 2016-11-21 21:38:23 +01:00