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@gmail.com --- dlls/dsound/buffer.c | 15 +++++---------- dlls/dsound/tests/dsound.c | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-)