From 09b5a82fdba1f97cd7d4bcd8040a893933b06b57 Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Tue, 25 Aug 2026 19:33:43 +0100 Subject: [PATCH] Fix sdl_sound missing definitions in macro context Without these guards, there are errors about the NativeCFFI functions not being defined: ``` .../lime/src/lime/_internal/backend/native/NativeAudioSource.hx:354: characters 15-42 : Class has no field lime_sdl_sound_stream_clear .../lime/src/lime/_internal/backend/native/NativeAudioSource.hx:391: characters 32-64 : Class has no field lime_sdl_sound_stream_from_bytes .../lime/src/lime/_internal/backend/native/NativeAudioSource.hx:395: characters 32-63 : Class has no field lime_sdl_sound_stream_from_file .../lime/src/lime/_internal/backend/native/NativeAudioSource.hx:457: characters 36-64 : Class has no field lime_sdl_sound_stream_rewind .../lime/src/lime/_internal/backend/native/NativeAudioSource.hx:467: characters 35-61 : Class has no field lime_sdl_sound_stream_seek .../lime/src/lime/_internal/backend/native/NativeAudioSource.hx:735: characters 25-51 : Class has no field lime_sdl_sound_stream_read .../lime/src/lime/system/Clipboard.hx:27: characters 31-54 : Unknown<0> cannot be constructed ``` --- src/lime/_internal/backend/native/NativeAudioSource.hx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lime/_internal/backend/native/NativeAudioSource.hx b/src/lime/_internal/backend/native/NativeAudioSource.hx index 51c587d73b..00e9f148ea 100644 --- a/src/lime/_internal/backend/native/NativeAudioSource.hx +++ b/src/lime/_internal/backend/native/NativeAudioSource.hx @@ -348,7 +348,7 @@ class NativeAudioSource private function clearSDLSoundStream():Void { - #if lime_sdl_sound + #if (lime_sdl_sound && !macro) if (sdlSoundStream != null) { NativeCFFI.lime_sdl_sound_stream_clear(sdlSoundStream); @@ -383,7 +383,7 @@ class NativeAudioSource private function openSDLSoundStream():Bool { - #if lime_sdl_sound + #if (lime_sdl_sound && !macro) clearSDLSoundStream(); if (parent.buffer.__srcSDLSoundBytes != null) @@ -441,7 +441,7 @@ class NativeAudioSource private function resetSDLSoundStream(time:Int):Bool { - #if lime_sdl_sound + #if (lime_sdl_sound && !macro) if (time < 0) { time = 0; @@ -721,7 +721,7 @@ class NativeAudioSource private function readSDLSoundBuffer(length:Int):Int { - #if lime_sdl_sound + #if (lime_sdl_sound && !macro) if (sdlSoundStream == null || length <= 0 || streamByteRate <= 0) { return 0;