From cc958f70efb78ebb2e462b2e2563fb9ad6254685 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 4 Feb 2019 07:29:49 +0100 Subject: AUDIO: Simplify _audioGain calculation No need to explicitly set it to 1.0. (There may have been in an earlier version, to avoid any possible rounding error. But if so, that reason is long gone.) --- audio/decoders/ac3.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'audio') diff --git a/audio/decoders/ac3.cpp b/audio/decoders/ac3.cpp index 1b2a3bff76..170d688b23 100644 --- a/audio/decoders/ac3.cpp +++ b/audio/decoders/ac3.cpp @@ -67,10 +67,7 @@ private: }; AC3Stream::AC3Stream(double decibel = 0.0) : _a52State(0), _frameSize(0), _inBufPtr(0), _flags(0), _sampleRate(0) { - if (decibel != 0.0) - _audioGain = pow(2, decibel / 6); - else - _audioGain = 1.0; + _audioGain = pow(2, decibel / 6); } AC3Stream::~AC3Stream() { -- cgit v1.2.3