From 173adadb8405804e641f5bd56e666d2b0a1a3861 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 21 Sep 2025 11:11:34 +0200 Subject: [PATCH] feat: initialize and use audio subsystem. --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 644f020..bc99433 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "image/color" "tetris/assets" + "tetris/engine/audio" "tetris/engine/core" "tetris/engine/graphics" "tetris/engine/render" @@ -118,6 +119,11 @@ func main() { }) defer render.Exit() + audio.Init() + defer audio.Exit() + + audio.LoadLibrary(assets.LoadSound()) + // Load texture texture := graphics.LoadTextureFromMemory(".png", assets.Sprite) defer rl.UnloadTexture(texture) @@ -129,6 +135,7 @@ func main() { SpawnShape() for !rl.WindowShouldClose() { + audio.Update() Update(rl.GetFrameTime()) Render() }