P8.1: minimal match/clear SFX via iOS System Sound Services (sx FFI)
Feasibility spike outcome: iOS audio from sx is feasible with no sx-library change. System Sound Services is plain C, reached with the same `#foreign` FFI uikit.sx already uses (UIApplicationMain / dlsym / CACurrentMediaTime); AudioToolbox + CoreFoundation are linked per-target in build.sx. Smallest viable SFX: one short CC0 clip (Kenney Interface Sounds, CC0 1.0) played when a swap clears a match. Purely additive — audio.sx reads/writes no score/board/move state; the wiring in board_view only adds a call. - audio.sx: load clear.wav once, AudioServicesPlaySystemSound on clear - board_view.sx: trigger sfx_clear() on a legal swap that clears (>=1 round) - main.sx: allocate + init g_audio at boot - build.sx: link AudioToolbox + CoreFoundation on iOS - assets/audio/clear.wav (+ one-line CC0 credit in LICENSE.txt) Verified: ios-sim build links; 18/18 tests pass; sim boot log shows "[sx] audio: clear cue loaded" (AudioServicesCreateSystemSoundID succeeded, asset shipped in the bundle and decoded).
This commit is contained in:
9
assets/audio/LICENSE.txt
Normal file
9
assets/audio/LICENSE.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
m3te sound effects
|
||||
==================
|
||||
|
||||
clear.wav — "confirmation_001" from Kenney's Interface Sounds pack
|
||||
(www.kenney.nl), licensed CC0 1.0 (public domain):
|
||||
https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
Converted to mono 44.1 kHz signed-16-bit PCM WAV (afconvert) — the format
|
||||
iOS System Sound Services loads directly via audio.sx.
|
||||
BIN
assets/audio/clear.wav
Normal file
BIN
assets/audio/clear.wav
Normal file
Binary file not shown.
Reference in New Issue
Block a user