| 347 | } |
| 348 | |
| 349 | void VirtualAudioBridge::logRxTimingSummary(int channel, DaxShmBlock* block, RxTimingStats& stats) |
| 350 | { |
| 351 | if (!stats.windowElapsed.isValid() || !lcDax().isDebugEnabled()) |
| 352 | return; |
| 353 | |
| 354 | const qint64 elapsedMs = stats.windowElapsed.elapsed(); |
| 355 | if (elapsedMs < 1000) |
| 356 | return; |
| 357 | |
| 358 | const uint32_t rp = block->readPos.load(std::memory_order_acquire); |
| 359 | const uint32_t wp = block->writePos.load(std::memory_order_acquire); |
| 360 | const uint32_t backlogSamples = wp - rp; |
| 361 | |
| 362 | qCDebug(lcDax).noquote() |
| 363 | << QStringLiteral("DAX RX ch %1 summary: interval_ms=%2 written_ms=%3 backlog_ms=%4 peak_backlog_ms=%5 trim_events=%6 trimmed_ms=%7 overruns=%8") |
| 364 | .arg(channel) |
| 365 | .arg(elapsedMs) |
| 366 | .arg(samplesToMs(stats.writtenSamples), 0, 'f', 1) |
| 367 | .arg(samplesToMs(backlogSamples), 0, 'f', 1) |
| 368 | .arg(samplesToMs(stats.peakBacklogSamples), 0, 'f', 1) |
| 369 | .arg(stats.trimEvents) |
| 370 | .arg(samplesToMs(stats.trimmedSamples), 0, 'f', 1) |
| 371 | .arg(stats.overrunEvents); |
| 372 | |
| 373 | stats.windowElapsed.restart(); |
| 374 | stats.writtenSamples = 0; |
| 375 | stats.trimmedSamples = 0; |
| 376 | stats.trimEvents = 0; |
| 377 | stats.overrunEvents = 0; |
| 378 | stats.peakBacklogSamples = backlogSamples; |
| 379 | } |
| 380 | |
| 381 | QByteArray VirtualAudioBridge::readTxAudio(int maxFrames) |
| 382 | { |
nothing calls this directly
no test coverage detected