DecoderThread: move code to DecoderControl::CycleMixRamp()
This commit is contained in:
parent
59ad6265a1
commit
2098b94b47
@ -144,8 +144,11 @@ decoder_control::MixRampEnd(char *_mixramp_end)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
decoder_control::MixRampPrevEnd(char *_mixramp_prev_end)
|
decoder_control::CycleMixRamp()
|
||||||
{
|
{
|
||||||
|
g_free(mixramp_start);
|
||||||
|
mixramp_start = nullptr;
|
||||||
g_free(mixramp_prev_end);
|
g_free(mixramp_prev_end);
|
||||||
mixramp_prev_end = _mixramp_prev_end;
|
mixramp_prev_end = mixramp_end;
|
||||||
|
mixramp_end = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,12 @@ public:
|
|||||||
|
|
||||||
void MixRampStart(char *_mixramp_start);
|
void MixRampStart(char *_mixramp_start);
|
||||||
void MixRampEnd(char *_mixramp_end);
|
void MixRampEnd(char *_mixramp_end);
|
||||||
void MixRampPrevEnd(char *_mixramp_prev_end);
|
|
||||||
|
/**
|
||||||
|
* Move mixramp_end to mixramp_prev_end and clear
|
||||||
|
* mixramp_start/mixramp_end.
|
||||||
|
*/
|
||||||
|
void CycleMixRamp();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -412,9 +412,7 @@ decoder_task(void *arg)
|
|||||||
|
|
||||||
switch (dc.command) {
|
switch (dc.command) {
|
||||||
case DecoderCommand::START:
|
case DecoderCommand::START:
|
||||||
dc.MixRampStart(nullptr);
|
dc.CycleMixRamp();
|
||||||
dc.MixRampPrevEnd(dc.mixramp_end);
|
|
||||||
dc.mixramp_end = nullptr; /* Don't free, it's copied above. */
|
|
||||||
dc.replay_gain_prev_db = dc.replay_gain_db;
|
dc.replay_gain_prev_db = dc.replay_gain_db;
|
||||||
dc.replay_gain_db = 0;
|
dc.replay_gain_db = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user