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 AAC Support #25

Open
thejsa opened this issue Jan 12, 2017 · 10 comments
Open

Add AAC Support #25

thejsa opened this issue Jan 12, 2017 · 10 comments

Comments

@thejsa
Copy link

thejsa commented Jan 12, 2017

Can you implement support for AAC? (See: libfaad)

@deltabeard
Copy link
Owner

I'll look in to libfaad2. According to http://www.audiocoding.com/faad2.html binary distributions require a patent license. I'm not sure whether this means it can be included in ctrmus or not.

@deltabeard
Copy link
Owner

deltabeard commented Jan 12, 2017

According to this if I were to add AAC decoding (using any AAC decoding library) then I would only be able to distribute my application in source form to avoid patent infringement - which is unacceptable.

I'll look in to it further later and make a decision.

@deltabeard
Copy link
Owner

According to VIA Licensing, a license is required to add an AAC decoder. AAC is therefore non-free and will not be added to ctrmus unfortunately, unless I'm reading this incorrectly.

Nintendo is on the list of licensees which is how they are able to add AAC file support.

MP3 patents have expired in the European Union, so that is fine. And Opus is royalty free. Please consider consider using Opus as an alternative.

Sorry.

@deltabeard
Copy link
Owner

deltabeard commented Jan 13, 2017

ffmpeg now has a fully open AAC encoder (& decoder) that does not seem to require a license to use. So AAC support can still be considered. Here was the discussion.

@deltabeard deltabeard reopened this Jan 13, 2017
@thejsa
Copy link
Author

thejsa commented Jan 15, 2017

That's great news. Perhaps you could migrate the codebase to simply use FFmpeg's libavcodec platform?

@deltabeard
Copy link
Owner

Yes, I will at some point. I'm still trying to get my head around threads and how they work on the 3DS for queue support. I think once queue and playlist support gets polished, I'll begin working on ffmpeg. 👍

@deltabeard deltabeard changed the title AAC support Use ffmpeg to support more files (incl. AAC support) Jan 21, 2017
@deltabeard
Copy link
Owner

Working on this in the ffmpeg branch. I've got ffmpeg to compile and play files that use an encoder that decodes to 16 bit.
Current issues include:

  • Slight blip when a new buffer is being played. Probably due to reading more samples than is in the buffer.
  • Many codecs such as AAC decode to floating point array. We need to use libswresample to convert from float (and any other format) to s16. This can be used to help as I haven't found much information from official documentation other than "use swresample". 😞
  • Many codecs decode to "planar" which is annoying 💢, but this can be solved with libswresample.

Debugging on the 3DS is a pain. Actually, I don't think it's even possible other than using loads of printf's, so I'm going to write a music decoder using ffmpeg on the computer, check to make sure it works properly, then port it to the 3DS.

@deltabeard
Copy link
Owner

So ffmpeg has turned out to be a pain in the ass, so I've paused working on it for now.

In other news, freeshop has decided to add AAC support showing that clearly they don't care, or don't know about whatever licencing issues that may arise with using AAC. Of course freeshop is already in deep water so maybe they don't give a shit about licencing issues?

@deltabeard deltabeard changed the title Use ffmpeg to support more files (incl. AAC support) Add AAC Support May 18, 2021
@deltabeard
Copy link
Owner

libfaad2 will be used to add AAC support.

@deltabeard
Copy link
Owner

libfaad2 is not available on devkitpro.

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

2 participants