Konstantin
Konstantin
You can look at msvcrt source code for the correct Windows implementation. Specifically, _aligned_malloc that calls _aligned_offset_malloc_base, both are in the source file align.c. Here’s a comment from there that...
> Doesn't VirtualAlloc have page granularity (4 KB on most systems)? The size granularity is page so you aren’t wasting that much RAM, but the allocation granularity is more, 64kb...
@obiwanjacobi The short answer, it might. I have not tested that way. Only tested the opposite way, consuming ComLight-based native DLLs with Microsoft’s COM interop in .NET Framework 4, and...
> no custom HResults etc Custom HRESULTs are truly COM compatible, they are well specified: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a > I did see they use a VARIANT somewhere - I understand ComLight does...
@obiwanjacobi The code you have linked should work. Couple things. 1. you only need `addRef: true` if the C++ code calls Release() 1 more time than AddRef/QueryInterface. If it doesn’t...
@blackhole89 You can probably combine xsum/ysum into a single vector, like that: __m256i xSumInt = _mm256_sad_epu8( bx, _mm256_setzero_si256() ); __m256i ySumInt = _mm256_sad_epu8( by, _mm256_setzero_si256() ); __m256i sumInt = _mm256_or_si256(...
@blackhole89 About the scalar FMA, compilers only do that automatically when `-ffast-math` (gcc, clang) or `/fp:fast` (vc++) switch is specified. Most people don’t specify these switches when compiling their C++....
@luke-jr I’ve implemented resampling. I’m on Windows and using Media Foundation, so the OS already includes that code. Here’s an example how to create a media type compatible with this...
@Topping1 Couple years ago I needed to resample realtime audio, preserving pitch. Also did some research, quickly found out that’s very complicated to implement. Then I found [libsoxr library](https://sourceforge.net/projects/soxr/) and...
That’s great news! Yeah, staying on D3D11 is probably a good idea. Not only due to Linux, but the newer GPU API is substantially harder to use. To address the...