Add additional logging to determine cause of #891.

ms-wasapi-debug
Mooneer Salem 2025-06-09 12:52:22 -07:00
parent bc8a8dc739
commit e57334bac9
1 changed files with 9 additions and 0 deletions

View File

@ -575,6 +575,7 @@ void WASAPIAudioDevice::stopRealTimeWork()
if (result != WAIT_TIMEOUT && result != WAIT_OBJECT_0)
{
// Fallback to a simple sleep.
log_warn("[%p] Got error %d from WaitForSingleObject", client_, result);
IAudioDevice::stopRealTimeWork();
}
}
@ -633,6 +634,10 @@ void WASAPIAudioDevice::renderAudio_()
}
copyToWindowsBuffer_(data, framesAvailable);
}
else
{
log_warn("[%p] No room in buffer for audio data!", client_);
}
// Release render buffer
hr = renderClient_->ReleaseBuffer(framesAvailable, 0);
@ -708,6 +713,10 @@ void WASAPIAudioDevice::captureAudio_()
onAudioDataFunction(*this, tmpBuf_, numFramesAvailable, onAudioDataState);
}
}
else
{
log_warn("[%p] No frames available for processing", client_);
}
// Release buffer
hr = captureClient_->ReleaseBuffer(numFramesAvailable);