call: диагностика ставок TX/RX и детект сталла аудио-девайса с хард-ресинком
This commit is contained in:
1 parent
570b421ba0
commit
6a0373ee73
5 files changed
+103
No files matched your search
@@ -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();
|
||||
|
||||
@@ -59,4 +59,9 @@ private:
|
||||
|
||||
std::vector<int16_t> m_captureBuf; /* 960 samples, аудио-поток */
|
||||
int m_capturePos = 0;
|
||||
|
||||
/* диагностика (DEBUG_CATEGORY_DEBUG): фактические параметры miniaudio-коллбэка */
|
||||
unsigned int m_dbgFrames = 0;
|
||||
uint32_t m_dbgCbCount = 0;
|
||||
uint64_t m_dbgLastTb = 0;
|
||||
};
|
||||
Reference in new issue
Block a user