[utils] was created long time ago, when [rcore] contained all the platforms code, the purpose of the file was exposing basic filesystem functionality across modules and also logging mechanism but many things have changed since then and there is no need to keep using this module.
- Logging system has been move to [rcore] module and macros are exposed through `config.h` to other modules
- File system functionality has also been centralized in [rcore] module that along the years it was already adding more and more file-system functions, now they are all in the same module
- Android specific code has been moved to `rcore_android.c`, it had no sense to have specific platform code in `utils`, [rcore] is responsible of all platform code.
In the case of a failure within miniaudio on the function: ma_convert_frames, the dynamic memory allocated for the `data` variable will leak on the early return.
* 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