summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/build.zig1
-rw-r--r--src/raudio.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/build.zig b/src/build.zig
index 44a3c171..8194e1e3 100644
--- a/src/build.zig
+++ b/src/build.zig
@@ -8,6 +8,7 @@ pub fn addRaylib(b: *std.build.Builder, target: std.zig.CrossTarget) *std.build.
const raylib_flags = &[_][]const u8{
"-std=gnu99",
"-DPLATFORM_DESKTOP",
+ "-D_GNU_SOURCE",
"-DGL_SILENCE_DEPRECATION=199309L",
"-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/1891
};
diff --git a/src/raudio.c b/src/raudio.c
index 78d3ebd3..d1b47f64 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -509,7 +509,9 @@ void CloseAudioDevice(void)
AUDIO.System.isReady = false;
RL_FREE(AUDIO.System.pcmBuffer);
-
+ AUDIO.System.pcmBuffer = NULL;
+ AUDIO.System.pcmBufferSize = 0;
+
TRACELOG(LOG_INFO, "AUDIO: Device closed successfully");
}
else TRACELOG(LOG_WARNING, "AUDIO: Device could not be closed, not currently initialized");