From 3da1b540fd333caee51ca710b8c9ef92ffcc692d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 4 Nov 2012 22:35:35 -0800 Subject: Use the stored buffer metrics for the mmdevapi buffer size --- Alc/backends/mmdevapi.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'Alc') 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); -- cgit v1.2.3