From 95d5f68782756d8464bb04bf29667d347fd179e2 Mon Sep 17 00:00:00 2001 From: sugarme Date: Wed, 24 Apr 2024 20:57:12 +1000 Subject: [PATCH] resolved #25 iOS supported --- README.md | 2 +- miniaudio.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1cb3554..cbe316b 100644 --- a/README.md +++ b/README.md @@ -21,5 +21,5 @@ Documentation on [GoDoc](https://godoc.org/github.com/gen2brain/malgo). Also che * Windows (WASAPI, DirectSound, WinMM) * Linux (PulseAudio, ALSA, JACK) * FreeBSD/NetBSD/OpenBSD (OSS/audio(4)/sndio) -* macOS (CoreAudio) +* macOS/iOS (CoreAudio) * Android (OpenSL|ES, AAudio) diff --git a/miniaudio.go b/miniaudio.go index a9c6a13..766b68b 100644 --- a/miniaudio.go +++ b/miniaudio.go @@ -11,6 +11,8 @@ package malgo #cgo netbsd LDFLAGS: -ldl -lpthread -lm #cgo freebsd LDFLAGS: -ldl -lpthread -lm #cgo android LDFLAGS: -lm +#cgo ios CFLAGS: -x objective-c +#cgo ios LDFLAGS: -framework CoreFoundation -framework AVFAudio -framework CoreAudio -framework AudioToolbox #cgo !noasm,!arm,!arm64 CFLAGS: -msse2 #cgo !noasm,arm,arm64 CFLAGS: -mfpu=neon -mfloat-abi=hard