call: диагностика ставок TX/RX и детект сталла аудио-девайса с хард-ресинком

This commit is contained in:
evgeny committed 2026-09-21 16:54:14 +03:00
1 parent 570b421ba0
commit 6a0373ee73
5 files changed
+103

No files matched your search

+18
View File
@@ -7,6 +7,7 @@
extern "C" {
#include "call/call_audio.h"
#include "../../lib/debug_config.h"
#include "../../lib/u_async.h"
}
#include <QTimer>
@@ -164,6 +165,23 @@ void CallAudioEngine::dataCallback(const void* in, void* out, unsigned int frame
const int16_t* in16 = (const int16_t*)in;
int16_t* out16 = (int16_t*)out;
/* диагностика (DEBUG_CATEGORY_DEBUG): фактические параметры miniaudio-коллбэка */
if (m_dbgFrames == 0) {
m_dbgFrames = frames;
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "CallAudio: callback frames=%u in=%s out=%s",
frames, in16 ? "yes" : "no", out16 ? "yes" : "no");
}
m_dbgCbCount++;
{
uint64_t now = get_time_tb();
if (m_dbgLastTb == 0) m_dbgLastTb = now;
else if (now - m_dbgLastTb >= 10000) {
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "CallAudio: cb=%u/s frames=%u", m_dbgCbCount, frames);
m_dbgCbCount = 0;
m_dbgLastTb = now;
}
}
/* захват: копим 960 samples → encode+send (сервисный слой). mute → тишина. */
if (in16) {
bool muted = m_muted.load();