Merge remote-tracking branch 'neheb/h'
This commit is contained in:
@@ -37,9 +37,9 @@
|
||||
#include "util/StringBuffer.hxx"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
DecoderBridge::DecoderBridge(DecoderControl &_dc, bool _initial_seek_pending,
|
||||
std::unique_ptr<Tag> _tag) noexcept
|
||||
@@ -611,7 +611,7 @@ DecoderBridge::SubmitReplayGain(const ReplayGainInfo *new_replay_gain_info) noex
|
||||
const auto &tuple = new_replay_gain_info->Get(rgm);
|
||||
const auto scale =
|
||||
tuple.CalculateScale(dc.replay_gain_config);
|
||||
dc.replay_gain_db = 20.0 * log10f(scale);
|
||||
dc.replay_gain_db = 20.0 * std::log10(scale);
|
||||
}
|
||||
|
||||
replay_gain_info = *new_replay_gain_info;
|
||||
|
@@ -26,12 +26,12 @@
|
||||
#include "util/ScopeExit.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
#include "util/Math.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <neaacdec.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "tag/Handler.hxx"
|
||||
#include "util/Domain.hxx"
|
||||
#include "util/Clamp.hxx"
|
||||
#include "util/Math.hxx"
|
||||
#include "util/ScopeExit.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
@@ -32,8 +33,6 @@
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
struct mpc_decoder_data {
|
||||
InputStream &is;
|
||||
DecoderClient *client;
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "tag/Handler.hxx"
|
||||
#include "fs/Path.hxx"
|
||||
#include "util/Alloc.hxx"
|
||||
#include "util/Math.hxx"
|
||||
#include "util/ScopeExit.hxx"
|
||||
#include "util/RuntimeError.hxx"
|
||||
|
||||
@@ -263,8 +264,7 @@ wavpack_decode(DecoderClient &client, WavpackContext *wpc, bool can_seek)
|
||||
if (samples_got == 0)
|
||||
break;
|
||||
|
||||
int bitrate = (int)(WavpackGetInstantBitrate(wpc) / 1000 +
|
||||
0.5);
|
||||
int bitrate = lround(WavpackGetInstantBitrate(wpc) / 1000);
|
||||
format_samples(chunk, samples_got * audio_format.channels);
|
||||
|
||||
cmd = client.SubmitData(nullptr, chunk,
|
||||
|
Reference in New Issue
Block a user