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

Load Sounds From Filesystem #119

Open
BrentDaMage opened this issue Apr 17, 2024 · 3 comments · May be fixed by #127
Open

Load Sounds From Filesystem #119

BrentDaMage opened this issue Apr 17, 2024 · 3 comments · May be fixed by #127

Comments

@BrentDaMage
Copy link
Contributor

Currently sounds are just embedded in memory. We should update our audio API abstraction layers to support loading sounds from files. Streaming sounds from files would also allow us to add in-game music.

This means updating:

  1. SoundSystemAL
  2. SoundSystemDS
  3. SoundSystemSL
@TheBrokenRail
Copy link
Contributor

This shouldn't be that difficult. Currently sounds are stored as PCM data, which if I understand correctly, is one header away from being a WAV file. All that should be needed is to change grabsounds.py to extract files (with the correct header) and to make the SoundSystem* classes do an fopen and fread instead of just using a variable.

On the topic of grabsounds.py changes, I'd also suggest changing it so that it actually parses the symbol table of libminecraftpe.so instead of hard-coding addresses so it can use more than one APK version.

@iProgramMC
Copy link
Member

iProgramMC commented Apr 17, 2024

Correct, a WAV file is pretty just PCM data with a header. It probably isn't that hard to make grabsounds.py output WAV files instead.

It is probably not that hard to parse the symbol table of the Minecraft PE shared object either, but I haven't really felt like doing it, because to get the best experience you'll need to use the 0.1.3 assets anyway.

@BrentDaMage
Copy link
Contributor Author

On the topic of grabsounds.py changes, I'd also suggest changing it so that it actually parses the symbol table of libminecraftpe.so instead of hard-coding addresses so it can use more than one APK version.

On a side note, the PCM sound files can be located in the files of iOS builds as well, particularly 0.10.0.

@TheBrokenRail TheBrokenRail linked a pull request Jun 18, 2024 that will close this issue
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 a pull request may close this issue.

3 participants