ReplayGainInfo: add method Get()
This commit is contained in:
parent
7ef31f84a7
commit
09c3cc58e4
@ -56,6 +56,10 @@ struct ReplayGainInfo {
|
||||
tuples[REPLAY_GAIN_TRACK].IsDefined();
|
||||
}
|
||||
|
||||
const ReplayGainTuple &Get(ReplayGainMode mode) const {
|
||||
return tuples[mode];
|
||||
}
|
||||
|
||||
void Clear() {
|
||||
tuples[REPLAY_GAIN_ALBUM].Clear();
|
||||
tuples[REPLAY_GAIN_TRACK].Clear();
|
||||
|
@ -597,7 +597,7 @@ DecoderBridge::SubmitReplayGain(const ReplayGainInfo *new_replay_gain_info)
|
||||
if (rgm != REPLAY_GAIN_ALBUM)
|
||||
rgm = REPLAY_GAIN_TRACK;
|
||||
|
||||
const auto &tuple = new_replay_gain_info->tuples[rgm];
|
||||
const auto &tuple = new_replay_gain_info->Get(rgm);
|
||||
const auto scale =
|
||||
tuple.CalculateScale(replay_gain_preamp,
|
||||
replay_gain_missing_preamp,
|
||||
|
@ -140,7 +140,7 @@ ReplayGainFilter::Update()
|
||||
{
|
||||
unsigned volume = PCM_VOLUME_1;
|
||||
if (mode != REPLAY_GAIN_OFF) {
|
||||
const auto &tuple = info.tuples[mode];
|
||||
const auto &tuple = info.Get(mode);
|
||||
float scale = tuple.CalculateScale(replay_gain_preamp,
|
||||
replay_gain_missing_preamp,
|
||||
replay_gain_limit);
|
||||
|
Loading…
Reference in New Issue
Block a user