/
diev
/
stelegramdesktop-tdesktop
Обзор
Документация
Войти
/
diev
/
stelegramdesktop-tdesktop
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
Telegram/SourceFiles/data/data_audio_msg_id.h
50 строк
1 KB
23rd
Added ability to change playback speed for long audio files.
01 сен 2021, 01:23
01 сен 2021, 01:23
bcbab7a
Код
Авторство
О чём код?
/* 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 class DocumentData; class AudioMsgId final { public: enum class Type { Unknown, Voice, Song, Video, }; AudioMsgId(); AudioMsgId( not_null<DocumentData*> audio, FullMsgId msgId, uint32 externalPlayId = 0); [[nodiscard]] static uint32 CreateExternalPlayId(); [[nodiscard]] static AudioMsgId ForVideo(); [[nodiscard]] Type type() const; [[nodiscard]] DocumentData *audio() const; [[nodiscard]] FullMsgId contextId() const; [[nodiscard]] uint32 externalPlayId() const; [[nodiscard]] bool changeablePlaybackSpeed() const; [[nodiscard]] explicit operator bool() const; bool operator<(const AudioMsgId &other) const; bool operator==(const AudioMsgId &other) const; bool operator!=(const AudioMsgId &other) const; private: void setTypeFromAudio(); DocumentData *_audio = nullptr; Type _type = Type::Unknown; FullMsgId _contextId; uint32 _externalPlayId = 0; bool _changeablePlaybackSpeed = false; };