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

Reading timidity soundfont from SDL_rwops #69

Open
ericoporto opened this issue May 25, 2022 · 2 comments
Open

Reading timidity soundfont from SDL_rwops #69

ericoporto opened this issue May 25, 2022 · 2 comments
Assignees

Comments

@ericoporto
Copy link
Contributor

Hey, I understand we can pass a soundfont path through an environment variable or SDL_setenv, but is it possible to pass a stream so I could find a soundfont inside a game package - using SDL_rwops or some way to pass the location in memory. Is something like this possible?

@ericoporto
Copy link
Contributor Author

ericoporto commented Mar 12, 2023

Actually it appears timidity already uses SDL_rwops internally. I think the only change is here

SDL_RWops *timi_openfile(const char *name)

Instead, if there was some way to pass SDL_rwops or some method to pass a callback to replace timi_openfile, then it all would workout!

We could use our own asset loading functions, which we can use then for loading from a diverse set of packages - essentially, it would be possible to make a game with it's own soundfont and also handle asset replacement with our own standard behavior.

@ericoporto
Copy link
Contributor Author

Other thing that would be great would be to use the SDL hint system somehow instead of SDL_setenv.

An additional issue is the Timidity fork used here has the "joined' file support currently broken - explained by an user here

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

No branches or pull requests

2 participants