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 support for BFSTM types of files #9

Open
MVDW-Java opened this issue Mar 2, 2020 · 7 comments
Open

Add support for BFSTM types of files #9

MVDW-Java opened this issue Mar 2, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@MVDW-Java
Copy link

MVDW-Java commented Mar 2, 2020

Hello Kenrick95,

I would like to suggest to add support for BFSTM.
This file is used in most Nintendo Switch and Wii U Games.

Thank you for the amazing work you have done making a web-based media player!

Kind regards,
MVDW.

@kenrick95 kenrick95 added enhancement New feature or request help wanted Extra attention is needed labels Mar 3, 2020
@kenrick95
Copy link
Owner

kenrick95 commented Mar 3, 2020

You're welcome!

Unfortunately, I'm not currently able to support implementing this idea and I'll left this issue open for now. Thanks

@ic-scm
Copy link
Contributor

ic-scm commented May 11, 2020

I might be able to try doing this after writing a BFSTM decoder in my own C++ BRSTM tools to have a good understanding of it but the JS module would have to support different header reading functions and file type detection

@kenrick95
Copy link
Owner

@Extrasklep Nice, thanks!

I would say that for a simple version we could just check using the file extension.

<input type="file" id="file" accept=".brstm" disabled />

Right now in the index.html, it only accepts ".brstm". So we need to extend this too.

For implementation, I suggest that this bfstm decoder be a separate "package" in the src/ folder so that we don't make the brstm decoder be more complex than what it already is. What do you think?

@ic-scm
Copy link
Contributor

ic-scm commented May 11, 2020

Yeah I guess it should be a separate file but it would also be stupid to completely separate it from the current package and copy the same audio decoding code with it when it could just use the same functions
In my BRSTM tools I just split each format's reading function into a separate file and the main read function does file type detection, calls the appropriate read function, and the program using it will just use the same audio decoding functions but I'm guessing this JS class stuff works a bit different than that, I'm not really into classes and object oriented programming

@kenrick95
Copy link
Owner

I see, yeah I think it's your call then on whether to make it a separate folder or not. I suggested that cause I would think that almost nothing is sharable across these two modules. If they do share lots of logic, then making it in a same folder is a good idea.

Sorry for the OOP, my original goal of this project was to make it work without regarding what paradigm is the best, I just used one that I like 😅

Thanks :)

@ic-scm
Copy link
Contributor

ic-scm commented May 11, 2020

The class constructor could do file type detection and then other format specific things could be moved into a separate format reading function or am I wrong?

@kenrick95
Copy link
Owner

Yup looks good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants