-
Notifications
You must be signed in to change notification settings - Fork 86
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
Music not getting IsPlaying() updated correctly #144
Comments
|
Tried that too, if the music is not playing it gets looped anyways.
The Resource manager gets a Object* to the object, i know its not quite elegant, but im improving it. |
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.
The text was updated successfully, but these errors were encountered: