diff options
| author | Christian Haas <[email protected]> | 2024-04-20 20:15:09 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-20 20:15:09 +0200 |
| commit | d80a622972deaaa1185d2c37d82cb21f0c16e697 (patch) | |
| tree | c4343553f8b971c03de47cb116be46eaecd1b445 /examples/raylib_makefile_example.bat | |
| parent | d95d4d4ad5ea8e3bdbd60842c64492200d13998f (diff) | |
| download | raylib-d80a622972deaaa1185d2c37d82cb21f0c16e697.tar.gz raylib-d80a622972deaaa1185d2c37d82cb21f0c16e697.zip | |
[raudio] Fix 3664: crash in raudio from multithreading issues (#3907)
* Flip release of buffer;
First it needs to be taken out of the processing chain, then it can be released. The inverse of the initialization.
* Add mutex locks to audio buffer functions; Separate those used from both threads
* Flip release of buffer;
First it needs to be taken out of the processing chain, then it can be released. The inverse of the initialization.
* Remove TODO marker; The buffer is in stopped state and its data won't be accessed
* Add mutex locks to music/stream functions directly operating on buffer
* Secure UpdateMusicStream/PlayMusicStream/UpdateAudioStream;
This change is twofold:
* Add locks to UpdateMusicStream/UpdateAudioStream (second one needed separation)
* Remove unnecessary hack to restart music - inlining the statements resulted in a no-op
Especially the second part made it easier to ensure thread-safety overall
* Remove redundant check; Already checked at beginning of function
Diffstat (limited to 'examples/raylib_makefile_example.bat')
0 files changed, 0 insertions, 0 deletions
