Commit 8f6c9979 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

winealsa: Use nBLockAlign instead of snd_pcm_bytes_to_frames to get buffer size.

parent 2eb0e1ce
......@@ -445,7 +445,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_SetFormat(PIDSCDRIVERBUFFER ifa
}
snd_pcm_hw_params_set_periods_integer(pcm, hw_params);
buffer_size = snd_pcm_bytes_to_frames(pcm, This->mmap_buflen_bytes);
buffer_size = This->mmap_buflen_bytes / pwfx->nBlockAlign;
snd_pcm_hw_params_set_buffer_size_near(pcm, hw_params, &buffer_size);
buffer_size = 5000;
snd_pcm_hw_params_set_period_time_near(pcm, hw_params, (unsigned int*)&buffer_size, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment