input/cache: first draft of the file cache
This commit is contained in:
@@ -28,10 +28,12 @@
|
||||
|
||||
PlayerControl::PlayerControl(PlayerListener &_listener,
|
||||
PlayerOutputs &_outputs,
|
||||
InputCacheManager *_input_cache,
|
||||
unsigned _buffer_chunks,
|
||||
AudioFormat _configured_audio_format,
|
||||
const ReplayGainConfig &_replay_gain_config) noexcept
|
||||
:listener(_listener), outputs(_outputs),
|
||||
input_cache(_input_cache),
|
||||
buffer_chunks(_buffer_chunks),
|
||||
configured_audio_format(_configured_audio_format),
|
||||
thread(BIND_THIS_METHOD(RunThread)),
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
struct Tag;
|
||||
class PlayerListener;
|
||||
class PlayerOutputs;
|
||||
class InputCacheManager;
|
||||
class DetachedSong;
|
||||
|
||||
enum class PlayerState : uint8_t {
|
||||
@@ -116,6 +117,8 @@ class PlayerControl final : public AudioOutputClient {
|
||||
|
||||
PlayerOutputs &outputs;
|
||||
|
||||
InputCacheManager *const input_cache;
|
||||
|
||||
const unsigned buffer_chunks;
|
||||
|
||||
/**
|
||||
@@ -234,6 +237,7 @@ class PlayerControl final : public AudioOutputClient {
|
||||
public:
|
||||
PlayerControl(PlayerListener &_listener,
|
||||
PlayerOutputs &_outputs,
|
||||
InputCacheManager *_input_cache,
|
||||
unsigned buffer_chunks,
|
||||
AudioFormat _configured_audio_format,
|
||||
const ReplayGainConfig &_replay_gain_config) noexcept;
|
||||
|
||||
@@ -1132,6 +1132,7 @@ try {
|
||||
SetThreadName("player");
|
||||
|
||||
DecoderControl dc(mutex, cond,
|
||||
input_cache,
|
||||
configured_audio_format,
|
||||
replay_gain_config);
|
||||
dc.StartThread();
|
||||
|
||||
Reference in New Issue
Block a user