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

Add streaming Sound assets #206

Open
RiscadoA opened this issue Nov 8, 2022 · 3 comments · Fixed by #1383
Open

Add streaming Sound assets #206

RiscadoA opened this issue Nov 8, 2022 · 3 comments · Fixed by #1383
Labels
A-Engine B-Assets B-Audio D-Complex Looks hard P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon S-Needs-Design Demands some time designing an implementation

Comments

@RiscadoA
Copy link
Member

RiscadoA commented Nov 8, 2022

Sound assets should be optionally streamable so that we can play music.

@RiscadoA RiscadoA changed the title Add optional streaming to Sound assets Add streaming Sound assets Aug 28, 2023
@RiscadoA RiscadoA added A-Engine B-Assets D-Complex Looks hard B-Audio S-Needs-Design Demands some time designing an implementation S-Blocked Blocked on another issue or PR labels Aug 28, 2023
@diogomsmiranda diogomsmiranda linked a pull request Nov 29, 2024 that will close this issue
5 tasks
@RiscadoA RiscadoA reopened this Nov 30, 2024
@RiscadoA
Copy link
Member Author

@diogomsmiranda @Dageus this isn't implemented yet. Streaming sound assets means not loading the entire sound asset at once, and instead, fetch one block at a time. This is important for stuff like music so that you don't waste memory just to keep around 10 mins of music, for example.

@RiscadoA RiscadoA removed the S-Blocked Blocked on another issue or PR label Nov 30, 2024
@Dageus
Copy link
Contributor

Dageus commented Nov 30, 2024

we would need to add a flag to the ma_sound_init_from_file:
ma_sound_init_from_file(&engine, "my_sound.wav", MA_SOUND_FLAG_STREAM, pGroup, NULL, &sound);

The amount of data loaded into memory is 2 seconds by default.

@RiscadoA
Copy link
Member Author

It isn't that simple sadly because we should use our filesystem abstraction instead of accessing the real filesystem directly as miniaudio does. The music file might be inside a .zip, or even embedded in the executable binary itself

@RiscadoA RiscadoA added the P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Engine B-Assets B-Audio D-Complex Looks hard P-Normal This issue isn't a big priority, but it would still be nice to have it closed soon S-Needs-Design Demands some time designing an implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants