Skip to content

Remove LoadMusicStreamFromPhysFS - #61

Merged
RobLoach merged 4 commits into
masterfrom
fix/58-loadmusicstreamfromphysfs-leaks
Aug 1, 2026
Merged

RobLoach merged 4 commits into
masterfrom
fix/58-loadmusicstreamfromphysfs-leaks

Conversation

@RobLoach

@RobLoach RobLoach commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Removes LoadMusicStreamFromPhysFS, which leaked the file buffer by design since raylib streams music from caller-owned memory; the README, example, and tests now show the supported pattern of LoadFileDataFromPhysFS + LoadMusicStreamFromMemory with UnloadFileData after UnloadMusicStream. Fixes #58

@RobLoach RobLoach self-assigned this Jul 22, 2026
@RobLoach

Copy link
Copy Markdown
Owner Author

fix conflict

Comment thread raylib-physfs.h Outdated
*
* @internal
*/
typedef struct PhysFSMusicFileData {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to avoid the static variables, and implementing the PhysFSMusicFileData struct? Maybe copy the memory inside?

@RobLoach
RobLoach marked this pull request as draft July 29, 2026 18:39
@RobLoach
RobLoach marked this pull request as ready for review July 31, 2026 03:16
@RobLoach
RobLoach force-pushed the fix/58-loadmusicstreamfromphysfs-leaks branch from 29d2cac to 2876f1e Compare August 1, 2026 16:12
@RobLoach RobLoach changed the title Add UnloadMusicStreamFromPhysFS to fix buffer leak Deprecate LoadMusicStreamFromPhysFS Aug 1, 2026
@RobLoach RobLoach changed the title Deprecate LoadMusicStreamFromPhysFS Remove LoadMusicStreamFromPhysFS Aug 1, 2026
Comment thread test/raylib-physfs-test.c Outdated
@RobLoach
RobLoach merged commit c2357e8 into master Aug 1, 2026
2 checks passed
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.

Remove LoadMusicStreamFromPhysFS (leaks the file buffer)

1 participant