Maarten Lankhorst : winealsa:
Use nBLockAlign instead of snd_pcm_bytes_to_frames to get buffer size.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Sep 12 07:50:35 CDT 2007
Module: wine
Branch: master
Commit: 8f6c99791b014da23690c84b9a2e328bc4b2e74f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f6c99791b014da23690c84b9a2e328bc4b2e74f
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Tue Sep 11 15:13:40 2007 +0200
winealsa: Use nBLockAlign instead of snd_pcm_bytes_to_frames to get buffer size.
---
dlls/winealsa.drv/dscapture.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/winealsa.drv/dscapture.c b/dlls/winealsa.drv/dscapture.c
index 7c1aaad..d872e9b 100644
--- a/dlls/winealsa.drv/dscapture.c
+++ b/dlls/winealsa.drv/dscapture.c
@@ -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);
More information about the wine-cvs
mailing list