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

Feature Request: Add a way to load files from memory in the Clib #112

Open
fucksophie opened this issue Jan 13, 2025 · 4 comments
Open

Feature Request: Add a way to load files from memory in the Clib #112

fucksophie opened this issue Jan 13, 2025 · 4 comments

Comments

@fucksophie
Copy link

Currently attempting to build xsynth for webassembly through the clib. It seems like the only way to achieve this is to use the XSynth_Soundfont_LoadNew function, which requires a path. Webassembly does not have a filesystem.

@fucksophie
Copy link
Author

Nevermind, cpal doesn't support emscripten anyways.

@arduano
Copy link
Collaborator

arduano commented Jan 16, 2025

Does wasm actually work with the threading stuff I did in xsynth? Rayon and all

@fucksophie
Copy link
Author

multithreading = -1, yeah. Just no multithreading, and my usecase requires the realtime API.

@arduano
Copy link
Collaborator

arduano commented Jan 16, 2025

Realtime is especially difficult because it uses multiple threads by default:

  • One thread for cpal to do its thing
  • 1 thread per channel, so 16 by default
  • An optional threadpool for the channels to pool per-key stuff. Can be omitted though

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