[PATCH 2/3] winepulse.drv: Keep buffer size separate from allocated size.

Rémi Bernon rbernon at codeweavers.com
Thu Dec 16 11:20:25 CST 2021


So that it rounds to integral audio frame count.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52225
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/winepulse.drv/pulse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c
index c329e8c423c..fb8133e9e45 100644
--- a/dlls/winepulse.drv/pulse.c
+++ b/dlls/winepulse.drv/pulse.c
@@ -876,7 +876,7 @@ static NTSTATUS pulse_create_stream(void *args)
             stream->alloc_size = stream->real_bufsize_bytes =
                 stream->bufsize_frames * 2 * pa_frame_size(&stream->ss);
             if (NtAllocateVirtualMemory(GetCurrentProcess(), (void **)&stream->local_buffer,
-                                        0, &stream->real_bufsize_bytes, MEM_COMMIT, PAGE_READWRITE))
+                                        0, &stream->alloc_size, MEM_COMMIT, PAGE_READWRITE))
                 hr = E_OUTOFMEMORY;
         } else {
             UINT32 i, capture_packets;
-- 
2.34.0




More information about the wine-devel mailing list