mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 13:33:38 +02:00
fix abs value call warning
This commit is contained in:
parent
a24789b721
commit
841da65eaf
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <math.h>
|
||||
|
@ -210,7 +211,7 @@ float AudioRingBuffer::getFrameLoudness(const int16_t* frameStart) const {
|
|||
const int16_t* _bufferLastAt = _buffer + _bufferLength - 1;
|
||||
|
||||
for (int i = 0; i < _numFrameSamples; ++i) {
|
||||
loudness += fabsf(*sampleAt);
|
||||
loudness += std::abs(*sampleAt);
|
||||
sampleAt = sampleAt == _bufferLastAt ? _buffer : sampleAt + 1;
|
||||
}
|
||||
loudness /= _numFrameSamples;
|
||||
|
|
Loading…
Reference in a new issue