summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-09-13 12:29:37 -0500
committersanine <sanine.not@pm.me>2022-09-13 12:29:37 -0500
commit8abd7a81c988b26c19406c1ea669e050d56d2db5 (patch)
treee4c9eaa76370380bec3c507bd6f42b6200540022 /demo
parent4826589445515d99e620da19e0d809728c071283 (diff)
add initial audio bindings
Diffstat (limited to 'demo')
-rw-r--r--demo/example_sound.oggbin0 -> 1089524 bytes
-rw-r--r--demo/honey.lua10
2 files changed, 10 insertions, 0 deletions
diff --git a/demo/example_sound.ogg b/demo/example_sound.ogg
new file mode 100644
index 0000000..5f97755
--- /dev/null
+++ b/demo/example_sound.ogg
Binary files differ
diff --git a/demo/honey.lua b/demo/honey.lua
index 9d007e5..f7b4392 100644
--- a/demo/honey.lua
+++ b/demo/honey.lua
@@ -2,6 +2,12 @@ local gl = honey.gl
local window = honey.window
+--===== initialize audio =====--
+
+local engine = honey.audio.engine_init()
+honey.audio.engine_play_sound(engine, 'example_sound.ogg')
+
+
--====== initialize opengl ======--
gl.Init()
@@ -196,5 +202,9 @@ while not window.shouldClose(w) do
window.swapBuffers(w)
window.pollEvents()
end
+
+--===== shut down =====--
+
window.destroy(w)
gl.Terminate()
+honey.audio.engine_uninit(engine)