Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by peabnuts123 · Jul 16, 2014 at 09:57 AM · audiopluginmusic

How can I read the M4A (AAC / ALAC) format in-code?

I'm writing a game that does audio processing (like Audiosurf) and it's crucial that I be able to support Apple's M4A container format and the audio formats within. All I need to do is read the raw wave data + any metadata tagged with the file, all the processing is then handled by my own code, but I simply CANNOT find any solutions for doing this (in Unity) anywhere.

I see there is faad2 which looks really nice but it's just a C++ library and I can't do much with it, beyond port it all to C# myself (which I really don't want to have to do).

Does anybody know of any way I might be able to achieve this? Licensing is not an issue, I just really want to find a solution to this without having to pull out the format specification and write one myself.

On the topic of writing things for myself, if it does come down to that, how might one write a plugin to interface with the FAAD2 .dll? Are there any resources for that? Sorry, kind of a second question, I know. Let's bring it back on topic.

TL;DR I really need to support Apple's M4A format in-code. How do?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ChristianLinnell · Feb 27, 2015 at 10:36 PM 0
Share

Hey Peabnuts... did you solve this?

avatar image peabnuts123 · Feb 28, 2015 at 02:17 AM 0
Share

See DanSuperGP's response. Looks like I might be able to write a plugin to interface with the faad2 DLL that I mentioned in my post

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by DanSuperGP · Feb 27, 2015 at 10:54 PM

Building a plugin is not that difficult. You basically write a wrapper that defines C# functions which trigger extern calls into the native code and the native code can also send limited messages into unity.

This manual page covers the basics, and there's a link at the bottom to a sample plugin for iOS.

http://docs.unity3d.com/Manual/PluginsForIOS.html

It's probably the easiest way to go, much easier than porting the library to C#.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image peabnuts123 · Feb 28, 2015 at 02:17 AM 0
Share

Thankyou for this, that sounds quite ideal. I am going to have a look into it

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Why unity decrease audio quality? 2 Answers

Can anyone help me invert this simple script? 2 Answers

Why is my backtrack's volume getting lower? 0 Answers

Getting beats from a song using frequency range 1 Answer

audio different in game than preview? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges