From 9d98e9f88718ab967cccce92f37fa3f54658e86b Mon Sep 17 00:00:00 2001 From: toxieainc Date: Thu, 11 Jun 2026 15:42:52 +0200 Subject: [PATCH 1/5] slightly improve precision --- miniaudio.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 2f38f5b0..163aedea 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -47807,7 +47807,6 @@ static MA_INLINE void ma_lpf1_process_pcm_frame_f32(ma_lpf1* pLPF, float* pY, co ma_uint32 c; const ma_uint32 channels = pLPF->channels; const float a = pLPF->a.f32; - const float b = 1 - a; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { @@ -47815,9 +47814,9 @@ static MA_INLINE void ma_lpf1_process_pcm_frame_f32(ma_lpf1* pLPF, float* pY, co float x = pX[c]; float y; - y = b*x + a*r1; + y = x + a*(r1 - x); - pY[c] = y; + pY[c] = y; pLPF->pR1[c].f32 = y; } } @@ -48679,8 +48678,7 @@ static MA_INLINE void ma_hpf1_process_pcm_frame_f32(ma_hpf1* pHPF, float* pY, co { ma_uint32 c; const ma_uint32 channels = pHPF->channels; - const float a = 1 - pHPF->a.f32; - const float b = 1 - a; + const float b = pHPF->a.f32; MA_ASSUME(channels > 0); for (c = 0; c < channels; c += 1) { @@ -48688,7 +48686,7 @@ static MA_INLINE void ma_hpf1_process_pcm_frame_f32(ma_hpf1* pHPF, float* pY, co float x = pX[c]; float y; - y = b*x - a*r1; + y = b*(x + r1) - r1; pY[c] = y; pHPF->pR1[c].f32 = y; From 4844874cdaa1b3841487bfcb291d02d8c1b8bac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E7=AB=9C=20=28Tommy=20Li=29?= Date: Fri, 29 May 2026 02:58:30 -0500 Subject: [PATCH 2/5] Set implementation file as Objective-C in CMake for Apple platforms This fixes CMake build targeting iOS due to usage of AVFoundation that requires Objective-C support. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d246a59c..39e771f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -500,6 +500,10 @@ if (UNIX) endif() endif() +if(APPLE) + enable_language(OBJC) + set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJC) +endif() # Static Libraries add_library(miniaudio From 00ce58dfa82e3cc67132637375ef8da6685830a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E7=AB=9C=20=28Tommy=20Li=29?= Date: Fri, 29 May 2026 17:17:37 -0500 Subject: [PATCH 3/5] Exclude macOS from Objective-C handling --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39e771f1..516c209b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -500,7 +500,10 @@ if (UNIX) endif() endif() -if(APPLE) +# APPLE is true for all Apple platforms. +# For macOS (MA_APPLE_DESKTOP, "Darwin" in CMake), the code uses CoreAudio that does not need Objective-C. +# For the other Apple platforms, the code uses AVFoundation that requires Objective-C. +if(APPLE AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Darwin")) enable_language(OBJC) set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJC) endif() From 87e22c68dd044c77c57e34a9b5bba3c4563ef6cc Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 11 Jul 2026 09:56:18 +1000 Subject: [PATCH 4/5] iOS: Use OBJCXX when FORCE_CXX is enabled. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 516c209b..c3cdbc7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -504,8 +504,13 @@ endif() # For macOS (MA_APPLE_DESKTOP, "Darwin" in CMake), the code uses CoreAudio that does not need Objective-C. # For the other Apple platforms, the code uses AVFoundation that requires Objective-C. if(APPLE AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Darwin")) - enable_language(OBJC) - set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJC) + if(MINIAUDIO_FORCE_CXX) + enable_language(OBJCXX) + set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJCXX) + else() + enable_language(OBJC) + set_source_files_properties(miniaudio.c PROPERTIES LANGUAGE OBJC) + endif() endif() # Static Libraries From 21349ce1586663472ca8822942c772dec395c089 Mon Sep 17 00:00:00 2001 From: Alex Belanger Date: Thu, 4 Jun 2026 00:10:42 -0400 Subject: [PATCH 5/5] Bump CMake min version to 3.13 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3cdbc7f..01e22dab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.13) # Extract version from miniaudio.h file(READ "${CMAKE_CURRENT_SOURCE_DIR}/miniaudio.h" MINIAUDIO_HEADER_CONTENTS)