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

NScumm.Audio.Players should accept byte streams, not files #5

Closed
BenMcLean opened this issue Dec 5, 2020 · 1 comment
Closed

NScumm.Audio.Players should accept byte streams, not files #5

BenMcLean opened this issue Dec 5, 2020 · 1 comment

Comments

@BenMcLean
Copy link
Contributor

BenMcLean commented Dec 5, 2020

File management should be done completely outside of NScumm.Audio.Players. It should not expect to have access to the file system. Instead of expecting a file, its API should expect a byte stream. It should be up to the user to decide (in their outside code) whether that byte stream comes from a file or a byte array in RAM or a web api or anything else it could be. This becomes particularly important on mobile devices or web apps which may not have permission to use the file system. Loading from a file system path could be provided as an option by a wrapper method to create the stream but should not be required.

I'll be putting together a PR that does this for ImfPlayer at least.

@scemino
Copy link
Owner

scemino commented Dec 5, 2020

I'm OK with that also.

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