From 85ae7e9c9a8e31359834b3b4da3c358b941e8012 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Oct 2013 14:19:34 +0200 Subject: DecoderControl: move code/attributes to new class MixRampInfo --- src/DecoderControl.hxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/DecoderControl.hxx') diff --git a/src/DecoderControl.hxx b/src/DecoderControl.hxx index c27177cbd..9a949b2fe 100644 --- a/src/DecoderControl.hxx +++ b/src/DecoderControl.hxx @@ -22,6 +22,7 @@ #include "DecoderCommand.hxx" #include "AudioFormat.hxx" +#include "MixRampInfo.hxx" #include "thread/Mutex.hxx" #include "thread/Cond.hxx" #include "thread/Thread.hxx" @@ -139,9 +140,8 @@ struct decoder_control { float replay_gain_db; float replay_gain_prev_db; - char *mixramp_start; - char *mixramp_end; - char *mixramp_prev_end; + + MixRampInfo mix_ramp, previous_mix_ramp; decoder_control(); ~decoder_control(); @@ -351,19 +351,20 @@ public: void Quit(); const char *GetMixRampStart() const { - return mixramp_start; + return mix_ramp.GetStart(); } const char *GetMixRampEnd() const { - return mixramp_end; + return mix_ramp.GetEnd(); } const char *GetMixRampPreviousEnd() const { - return mixramp_prev_end; + return previous_mix_ramp.GetEnd(); } - void MixRampStart(char *_mixramp_start); - void MixRampEnd(char *_mixramp_end); + void SetMixRamp(MixRampInfo &&new_value) { + mix_ramp = std::move(new_value); + } /** * Move mixramp_end to mixramp_prev_end and clear -- cgit v1.2.3