chatgui: report radio output progress with device timing

This commit is contained in:
evgeny committed 2026-10-08 14:27:05 +02:00
1 parent fe7aabb44a
commit 06c35839ef
3 files changed
+31 -6

No files matched your search

+1 -1
View File
@@ -163,7 +163,7 @@ unsigned SoundManager::renderOutput(ma_engine* engine, const std::array<VoiceAud
if (engine && ma_engine_read_pcm_frames(engine, destination, count, nullptr) != MA_SUCCESS) {
++errors; std::fill_n(destination, count * 2, 0.0f);
}
for (auto* voice : voices) if (voice) voice->mix(destination, count);
for (auto* voice : voices) if (voice) voice->mix(destination, count, firstTimeUs + (int64_t)offset * 1000000 / 48000);
for (unsigned i = 0; i < count * 2; ++i) {
float value = destination[i];
destination[i] = std::isfinite(value) ? std::clamp(value, -1.0f, 1.0f) : 0.0f;