implement audio playing

This commit is contained in:
2026-11-08 20:20:10 +03:00
parent 935b30aae0
commit 0816e8e4ec
5 changed files with 104 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
(pub import pages)
(pub import utils)
(import audio)
(define RAYGUI_IMPLEMENTATION 1)
(include raygui.h)
@@ -56,6 +57,7 @@
(fn main-loop ((void-state (* void))) void
(var state _ (cast void-state (* app-state)))
(.change-page- state)
(audio-update)
(match (. state page)
((menu (state))
(update-menu state)
@@ -70,11 +72,13 @@
InitWindow WIN-WIDTH WIN-HEIGHT "Catch-Phase")
(call-and-check IsAudioDeviceReady "failed to init audio" 2
InitAudioDevice)
(audio-init)
(SetExitKey -1)
(GuiSetStyle DEFAULT TEXT-SIZE 30)
(SetTargetFPS 60))
(fn deinit () void
(audio-deinit)
(CloseAudioDevice)
(CloseWindow))