aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/mmdevapi.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-11-04 22:35:35 -0800
committerChris Robinson <[email protected]>2012-11-04 22:35:35 -0800
commit3da1b540fd333caee51ca710b8c9ef92ffcc692d (patch)
treeb19120dc9e466c931f77098bec79d3b564310fa9 /Alc/backends/mmdevapi.c
parent92dde81296778ba9d8a58777c0de192f14e45387 (diff)
Use the stored buffer metrics for the mmdevapi buffer size
Diffstat (limited to 'Alc/backends/mmdevapi.c')
-rw-r--r--Alc/backends/mmdevapi.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index 9db83003..de4201dd 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -233,18 +233,10 @@ static ALuint MMDevApiProc(ALvoid *ptr)
return 0;
}
- hr = IAudioClient_GetBufferSize(data->client, &buffer_len);
- if(FAILED(hr))
- {
- ERR("Failed to get audio buffer size: 0x%08lx\n", hr);
- aluHandleDisconnect(device);
- CoUninitialize();
- return 0;
- }
-
SetRTPriority();
update_size = device->UpdateSize;
+ buffer_len = update_size * device->NumUpdates;
while(!data->killNow)
{
hr = IAudioClient_GetCurrentPadding(data->client, &written);