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

This commit is contained in:
Maarten Lankhorst 2007-09-11 15:13:40 +02:00 committed by Alexandre Julliard
parent 2eb0e1ce21
commit 8f6c99791b
1 changed files with 1 additions and 1 deletions

View File

@ -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);