2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fix some bugs in double playback speed.

- Apply double speed for all voice tracks, not only for the current.
- Use dedicated atomic in Mixer for the voice speed (fix race).
- Store the playback speed in user settings, not in global settings.
- Use float64 for setting (just consistency, no float-s right now).
This commit is contained in:
John Preston
2018-11-08 17:06:22 +04:00
parent de8518a112
commit 346cb4e203
8 changed files with 60 additions and 34 deletions

View File

@@ -649,7 +649,7 @@ struct Data {
bool SuggestEmoji = true;
bool SuggestStickersByEmoji = true;
base::Observable<void> ReplaceEmojiChanged;
float VoiceMsgPlaybackSpeed = 1.f;
float64 VoiceMsgPlaybackSpeed = 1.;
bool SoundNotify = true;
bool DesktopNotify = true;
bool RestoreSoundNotifyFromTray = false;
@@ -779,7 +779,7 @@ DefineVar(Global, bool, ReplaceEmoji);
DefineVar(Global, bool, SuggestEmoji);
DefineVar(Global, bool, SuggestStickersByEmoji);
DefineRefVar(Global, base::Observable<void>, ReplaceEmojiChanged);
DefineVar(Global, float, VoiceMsgPlaybackSpeed);
DefineVar(Global, float64, VoiceMsgPlaybackSpeed);
DefineVar(Global, bool, SoundNotify);
DefineVar(Global, bool, DesktopNotify);
DefineVar(Global, bool, RestoreSoundNotifyFromTray);