Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio doesnt work in embedded mode #24

Open
smezzy opened this issue Feb 15, 2024 · 0 comments
Open

Audio doesnt work in embedded mode #24

smezzy opened this issue Feb 15, 2024 · 0 comments

Comments

@smezzy
Copy link

smezzy commented Feb 15, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant