diff options
-rw-r--r-- | Alc/backends/mmdevapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c index 75370489..860515be 100644 --- a/Alc/backends/mmdevapi.c +++ b/Alc/backends/mmdevapi.c @@ -1602,6 +1602,10 @@ static HRESULT ALCmmdevCapture_resetProxy(ALCmmdevCapture *self) buf_time = ((REFERENCE_TIME)device->UpdateSize*device->NumUpdates*10000000 + device->Frequency-1) / device->Frequency; + // Make sure buffer is at least 100ms in size + buf_time = maxu64(buf_time, U64(1000000)); + device->UpdateSize = (buf_time*device->Frequency + 10000000-1)/10000000 / + device->NumUpdates; OutputType.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; switch(device->FmtChans) |