[XNA Song] Add mp3 support #17

Open
opened 2018-07-13 15:59:17 -05:00 by flibitijibibo · 0 comments
flibitijibibo commented 2018-07-13 15:59:17 -05:00 (Migrated from github.com)

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.

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 in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-FNA-XNA/FAudio#17
No description provided.