|
|
|
|
@ -60,7 +60,13 @@ struct AudioCapture::Session {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
void recover() { |
|
|
|
|
if (device.needsRecovery()) { stop(); device.retryLater(); } |
|
|
|
|
if (device.needsRecovery()) { |
|
|
|
|
if (device.resizingBuffer()) { |
|
|
|
|
for (auto& slot : consumers) if (slot.client) detach(slot); |
|
|
|
|
device.closeAsync(); |
|
|
|
|
} else stop(); |
|
|
|
|
device.retryLater(); |
|
|
|
|
} |
|
|
|
|
if (device.initialized()) { prepare(); return; } |
|
|
|
|
auto* context = SoundManager::instance()->context(); |
|
|
|
|
if (!context || !device.retryReady()) return; |
|
|
|
|
|