encrypt overhead fix (33→36, noencrypt_len), mtu default 1280, connmonitor window, total_decrypted for TCP, check.sh

This commit is contained in:
evgeny committed 2026-08-08 16:56:32 +03:00
1 parent 9846599086
commit ca176e1f24
41 files changed
+643 -91

No files matched your search

+10 -9
View File
@@ -153,14 +153,16 @@ bool MessageDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
if (!st.playing && !st.paused) {
/* Start playback then seek */
float actualDur = VoicePlayer::playOpusFile(filePath);
if (actualDur <= 0.0f) return false;
targetSec = clickFrac * actualDur;
st.playing = true;
st.paused = false;
st.durationSec = dur;
st.durationSec = actualDur;
st.startMs = now - (qint64)(targetSec * 1000.0);
st.pausedPosSec = targetSec;
st.displayFrac = (targetSec > 0 && dur > 0) ? (targetSec / dur) : 0;
st.displayFrac = (targetSec > 0 && actualDur > 0) ? (targetSec / actualDur) : 0;
st.displayElapsed = targetSec;
VoicePlayer::playOpusFile(filePath);
int sr = SoundManager::instance()->currentPcmSampleRate();
if (sr > 0)
SoundManager::instance()->seekCurrentPcm((unsigned long long)(targetSec * sr));
@@ -222,15 +224,16 @@ bool MessageDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
SoundManager::instance()->stopCurrentPcm();
}
float actualDur = VoicePlayer::playOpusFile(filePath);
if (actualDur <= 0.0f) return false;
st.playing = true;
st.paused = false;
st.pausedPosSec = 0;
st.startMs = QDateTime::currentMSecsSinceEpoch();
st.durationSec = dur;
st.durationSec = actualDur;
st.displayFrac = 0;
st.displayElapsed = 0;
VoicePlayer::playOpusFile(filePath);
s_voiceTimer->start();
model->setData(index, 1, MsgVoicePlayStateRole);
return true;
@@ -850,8 +853,6 @@ void MessageDelegate::paint(QPainter *painter, const QStyleOptionViewItem &optio
QColor idle(0x70, 0x70, 0x78, 130);
painter->setBrush((isPlaying || isPaused) ? (before ? played : unplayed) : idle);
painter->drawRect(QRect(x, y, bw, barH));
if (i == 0) GUI_DEBUG("voice paint: wfN=%d wfW=%d logV=%.2f barH=%d",
wfN, wfR.width(), logV, barH);
}
}
@@ -1187,12 +1188,12 @@ void MessageDelegate::drawAvatar(QPainter *p, const Layout &L,
p->restore();
}
void MessageDelegate::startAutoPlay(const QString& filePath, float durationSec) {
void MessageDelegate::startAutoPlay(const QString& filePath, float actualDurationSec) {
ensureVoiceTimer();
VoicePlayState& st = s_voiceStates[filePath];
st.playing = true;
st.paused = false;
st.durationSec = (durationSec > 0) ? durationSec : 1.0f;
st.durationSec = (actualDurationSec > 0) ? actualDurationSec : 1.0f;
st.startMs = QDateTime::currentMSecsSinceEpoch();
st.pausedPosSec = 0.0f;
st.displayFrac = 0.0f;