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

Fixed a worker thread crash caused by the main thread releasing the c… #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nwhasd
Copy link

@nwhasd nwhasd commented Feb 4, 2024

crash Set a breakpoint, debug the code step by step, and the program will crash. Commenting out the StopMusicStream function has a greater chance of crashing.
#include <iostream>
#include "raudio.h"

int main()
{
    InitAudioDevice();
    Music* pMusic = new Music();
    *pMusic = LoadMusicStream("C:/music.mp3");
    PlayMusicStream(*pMusic);
    UpdateMusicStream(*pMusic);
    // StopMusicStream(*pMusic);
    UnloadMusicStream(*pMusic);
    delete(pMusic);
    CloseAudioDevice();
    return 0;
}

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

Successfully merging this pull request may close these issues.

1 participant