From b21f72fef00ea6a6c30fd02237b46878a07a9529 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 27 Jan 2017 10:25:43 +0300 Subject: [PATCH] Fixed build for old OS X. --- Telegram/SourceFiles/media/media_audio.cpp | 2 +- Telegram/SourceFiles/media/media_audio_capture.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/media/media_audio.cpp b/Telegram/SourceFiles/media/media_audio.cpp index c968c4882..443f510a9 100644 --- a/Telegram/SourceFiles/media/media_audio.cpp +++ b/Telegram/SourceFiles/media/media_audio.cpp @@ -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()); diff --git a/Telegram/SourceFiles/media/media_audio_capture.cpp b/Telegram/SourceFiles/media/media_audio_capture.cpp index 480541eca..cc23e457f 100644 --- a/Telegram/SourceFiles/media/media_audio_capture.cpp +++ b/Telegram/SourceFiles/media/media_audio_capture.cpp @@ -29,6 +29,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #define AL_ALEXT_PROTOTYPES #include +#include + 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());