From dd644e92694947f5ce9cc63868bc0dbceb68c49c Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 11 Jul 2026 10:41:12 +1000 Subject: [PATCH] Add placeholder RISC-V architecture detection. Public issue https://github.com/mackron/miniaudio/pull/1135 --- miniaudio.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 163aedea..6463425c 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -11660,12 +11660,24 @@ IMPLEMENTATION #define MA_ARM64 #endif +#if defined(__riscv) + #if defined(__riscv_xlen) + #if __riscv_xlen == 64 + #define MA_RISCV64 + #elif __riscv_xlen == 32 + #define MA_RISCV32 + #endif + #endif +#endif + #if defined(__x86_64__) || (defined(_M_X64) && !defined(_M_ARM64EC)) #define MA_X64 #elif defined(__i386) || defined(_M_IX86) #define MA_X86 #elif defined(MA_ARM32) || defined(MA_ARM64) #define MA_ARM +#elif defined(MA_RISCV32) || defined(MA_RISCV64) +#define MA_RISCV #endif /* Intrinsics Support */