Skip to content

Commit

Permalink
faudio: win32: Enable NEON intrinsic usage when supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
bylaws authored and flibitijibibo committed Apr 23, 2024
1 parent ffbd861 commit b662b49
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/FAudio_platform_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,14 @@ void FAudio_PlatformInit(
HRESULT hr;
HANDLE audioEvent = NULL;
BOOL has_sse2 = IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE);

FAudio_INTERNAL_InitSIMDFunctions(has_sse2, FALSE);
#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm64ec__) || defined(_M_ARM64EC)
BOOL has_neon = TRUE;
#elif defined(__arm__) || defined(_M_ARM)
BOOL has_neon = IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE);
#else
BOOL has_neon = FALSE;
#endif
FAudio_INTERNAL_InitSIMDFunctions(has_sse2, has_neon);
FAudio_resolve_SetThreadDescription();

FAudio_PlatformAddRef();
Expand Down

0 comments on commit b662b49

Please sign in to comment.