Music not getting IsPlaying() updated correctly

Aperta
#144 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
game-dev

Direzione di ricerca

Start with the draft example and trace the Music wrapper's Play(), Update(), IsPlaying(), and assignment behavior, comparing it with the base raylib behavior described in the issue. Reproduce the two-track switch and reload cases; done means IsPlaying() reflects playback state and switching to music2 stops the looping music1 as expected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When loading 2 raylib::Music files, and waiting on a if (!currentMusic.IsPlaying()) to switch to music2 using the same pointer. The Music file does not update correctly.

Draft example:
raylib::Music* currentMusic, music1, music2;
music1 = new raylib::Music("1.ogg");
music1.SetLooping(false);
music2 = new raylib::Music("2.ogg");
currentMusic = music1;
currentMusic.Play();
while (running) {
currentMusic.Update();
if (!currentMusic.IsPlaying()) {
currentMusic = music2;
}

Is an example to be filled on the app example. On my case, if I reload the App or make the songs reload on a key press, they dont change and the music1 keeps playing on loop.
Tried with the base library, works as intended. Tried with bindings, fails on this case.
I dont know if the issue is with an operator= when reasigning pointers.

Lingua principale
C++
Stelle
960
Fork
120
Merge medio
10m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RobLoach/raylib-cpp

Tutte le issue di RobLoach/raylib-cpp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.