TSnake41/raylib-lua

Audio doesnt work in embedded mode

Opened this issue · 0 comments

sorry i am no c programmer i have no ideia why it doesnt work but it doesnt work
the following example works fine when running in scritpt mode but not when i build the exe

local width, height = 800, 450

rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
rl.InitWindow(800, 450, "raylib")
rl.InitAudioDevice()

local logo = rl.LoadTexture "assets/logo.png"
local music = rl.LoadMusicStream "assets/music/music.ogg"

rl.PlayMusicStream(music)

while not rl.WindowShouldClose() do
  rl.UpdateMusicStream(music)

	rl.BeginDrawing()
  rl.ClearBackground(rl.RAYWHITE)

  rl.DrawTexture(logo, width/2 - logo.width/2, height/2 - logo.height/2, rl.WHITE)
  rl.DrawText("this is a texture!", 350, 370, 10, rl.GRAY)

  rl.EndDrawing()
end

rl.UnloadMusicStream(music)

rl.CloseAudioDevice()
rl.CloseWindow()

the raylib output indicates that files were loaded succesfully, and if I remove the rl.UpdateMusicStream it seems to work fine (although the music wont play)