[PATCH v4 2/2] dsound: Make GlobalHandle() for the sound buffer failed.

Akihiro Sagawa sagawa.aki at gmail.com
Fri Mar 6 06:52:46 CST 2020


In v4, retire VirtualAlloc/VirtualFree and use HeapAlloc + offset
method, again.

On Mon, 02 Mar 2020 20:37:26 +0100, Alexandre Julliard wrote:
> Note that VirtualAlloc allocates in 64K chunks. Is the typical buffer
> size large enough to justify this?
It turns out that VirtualAlloc's 64K chunk isn't suitable for dsound
buffer. I examined some applications and they use 88,200, 176,400,
192,000 or 352,800 as a buffer size. In most cases, it's multiple of a
sample size, i.e. 44,100 or 48,000. Though, it's often greater than 64K,
it isn't large enough. I give up this way.

In this patch, I employ a pointer size alignment. Andrew, do we need to
allocate in larger chunk, e.g. 4K?

Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
---
 dlls/dsound/buffer.c       | 15 +++++----------
 dlls/dsound/tests/dsound.c |  2 +-
 2 files changed, 6 insertions(+), 11 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4-0002-dsound-Make-GlobalHandle-for-the-sound-buffer-fai.patch
Type: text/x-patch
Size: 2517 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200306/07680acc/attachment.bin>


More information about the wine-devel mailing list