Defer new shared subscribers during microphone buffer resizing

This commit is contained in:
evgeny committed 2026-10-16 17:15:51 +02:00
1 parent ca09073a52
commit e37b3be7da
2 files changed
+9 -1

No files matched your search

+4
View File
@@ -123,6 +123,10 @@ bool AudioCapture::open(const QString& input, Role role, int channels, uint64_t
}
if (!m_session) { m_session = std::make_shared<Session>(key); sessions.push_back(m_session); }
auto& session = *m_session;
if (session.device.closing()) {
DEBUG_WARN(DEBUG_CATEGORY_CALL, "capture: shared input is resizing its buffer; new subscription deferred");
m_session.reset(); return false;
}
auto& slot = session.consumers[role == Role::Stream ? 0 : 1];
if (slot.client) {
DEBUG_ERROR(DEBUG_CATEGORY_CALL, "capture: duplicate consumer role=%s", role == Role::Stream ? "stream" : "radio");