Skip to content

Audio doesnt work in embedded mode #24

Description

@smezzy

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions