/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include "settings/settings_common.h" #include "base/timer.h" namespace Calls { class Call; } // namespace Calls namespace Ui { class LevelMeter; } // namespace Ui namespace tgvoip { class AudioInputTester; } // namespace tgvoip namespace Settings { class Calls : public Section { public: Calls(QWidget *parent, not_null controller); ~Calls(); void sectionSaveChanges(FnMut done) override; private: void setupContent(); void requestPermissionAndStartTestingMicrophone(); void startTestingMicrophone(); void stopTestingMicrophone(); const not_null _controller; rpl::event_stream _outputNameStream; rpl::event_stream _inputNameStream; rpl::event_stream _micTestTextStream; bool _needWriteSettings = false; std::unique_ptr _micTester; Ui::LevelMeter *_micTestLevel = nullptr; base::Timer _levelUpdateTimer; }; } // namespace Settings