Skip to content

Commit

Permalink
Peak with dB
Browse files Browse the repository at this point in the history
  • Loading branch information
Dendraspis authored Jul 16, 2020
1 parent 8f41757 commit fa133c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ static double do_normalize(std::vector<std::shared_ptr<ISource> > &chain,
progress.update(src->getPosition());
}
progress.finish(src->getPosition());
LOG(L"Peak value: %g\n", normalizer->getPeak());
return normalizer->getPeak();
LOG(L"Peak: %g (%gdB)\n", normalizer->getPeak(), util::scale_to_dB(normalizer->getPeak()));
return normalizer->getPeak();
}

void build_filter_chain_sub(std::shared_ptr<ISeekableSource> src,
Expand Down Expand Up @@ -659,7 +659,7 @@ void decode_file(const std::vector<std::shared_ptr<ISource> > &chain,
cafsink->finishWrite(AudioFilePacketTableInfo());
} else if (opts.isPeak()) {
PeakSink *p = dynamic_cast<PeakSink *>(sink.get());
LOG(L"peak: %g (%gdB)\n", p->peak(), util::scale_to_dB(p->peak()));
LOG(L"Peak: %g (%gdB)\n", p->peak(), util::scale_to_dB(p->peak()));
}
}

Expand Down

0 comments on commit fa133c7

Please sign in to comment.