[XNA Song] Add mp3 support #17
Labels
No labels
Bug
Extensions
New Feature
Not our bug - SDL2
Not our bug - WMA
Utilities
Wine
X3DAudio Accuracy
XACT Accuracy
XAudio2 Accuracy
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-FNA-XNA/FAudio#17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.