Add music in embedding demo.
This commit is contained in:
parent
49de44490e
commit
37a89f7b18
@ -2,8 +2,12 @@ local width, height = 800, 450
|
|||||||
|
|
||||||
rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
|
rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
|
||||||
rl.InitWindow(800, 450, "raylib [shapes] example - basic shapes drawing")
|
rl.InitWindow(800, 450, "raylib [shapes] example - basic shapes drawing")
|
||||||
|
rl.InitAudioDevice()
|
||||||
|
|
||||||
local logo = rl.LoadTexture "ressources/logo.png"
|
local logo = rl.LoadTexture "ressources/logo.png"
|
||||||
|
local music = rl.LoadSound "ressources/mini1111.ogg"
|
||||||
|
|
||||||
|
rl.PlaySound(music)
|
||||||
|
|
||||||
while not rl.WindowShouldClose() do
|
while not rl.WindowShouldClose() do
|
||||||
rl.BeginDrawing()
|
rl.BeginDrawing()
|
||||||
@ -15,4 +19,5 @@ while not rl.WindowShouldClose() do
|
|||||||
rl.EndDrawing()
|
rl.EndDrawing()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rl.CloseAudioDevice()
|
||||||
rl.CloseWindow()
|
rl.CloseWindow()
|
||||||
|
BIN
examples/embedding/ressources/mini1111.ogg
Normal file
BIN
examples/embedding/ressources/mini1111.ogg
Normal file
Binary file not shown.
BIN
examples/embedding/ressources/mini1111.xm
Normal file
BIN
examples/embedding/ressources/mini1111.xm
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user