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.
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.