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

[XNA Song] Add mp3 support #17

Open
flibitijibibo opened this issue Jul 13, 2018 · 0 comments
Open

[XNA Song] Add mp3 support #17

flibitijibibo opened this issue Jul 13, 2018 · 0 comments

Comments

@flibitijibibo
Copy link
Member

From the beginning, FNA has always supported Ogg Vorbis files exclusively, primarily due to patent/licensing concerns and the ability to share dependencies with the Theora-based VideoPlayer.

However, part of FAudio's new features is using stb_vorbis to stream Vorbis data, and since FNA's creation the mp3 patent(s) have expired. We now have at least one single-file mp3 decoder library available to us under a public domain license:

https://github.com/lieff/minimp3

There is another library based on minimp3 but with a lot more "stuff" in it:

https://github.com/mackron/dr_libs/blob/master/dr_mp3.h

With this in mind, I'm filing this issue as an offer to anyone who really wants mp3 support and doesn't want to use Ogg Vorbis files. All I ask is that it stays entirely within XNA_Song.c and is at least as clean as the stb_vorbis support. We'll have to detect the file format when passed a file name, then select the decoder and FAudioSourceVoice callback function. Everything else should stay the same, I think...

Note that I'm perfectly happy with Ogg Vorbis myself, so don't expect me to do this myself. This is specifically available for those who prefer mp3 and are willing to put in the work to support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant