Fixed build for old OS X.

This commit is contained in:
John Preston 2017-01-27 10:25:43 +03:00
parent 697fdd4294
commit b21f72fef0
2 changed files with 4 additions and 2 deletions

View File

@ -1749,7 +1749,7 @@ public:
return false;
}
int64 sum = std::accumulate(peaks.cbegin(), peaks.cend(), 0ULL);
auto sum = std::accumulate(peaks.cbegin(), peaks.cend(), 0LL);
peak = qMax(int32(sum * 1.8 / peaks.size()), 2500);
result.resize(peaks.size());

View File

@ -29,6 +29,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#define AL_ALEXT_PROTOTYPES
#include <AL/alext.h>
#include <numeric>
namespace Media {
namespace Capture {
namespace {
@ -412,7 +414,7 @@ void Instance::Inner::onStop(bool needResult) {
}
}
int64 sum = std::accumulate(peaks.cbegin(), peaks.cend(), 0ULL);
auto sum = std::accumulate(peaks.cbegin(), peaks.cend(), 0LL);
peak = qMax(int32(sum * 1.8 / peaks.size()), 2500);
waveform.resize(peaks.size());