Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by KyleKing · Sep 11, 2011 at 10:01 PM · iosxcodemp3

Load songs from iOS Music Player?

Hello everyone,

I am aware that you can take files access and copy files from the iOS Library via Xcode/Obj-c, but I am wondering if there is a way for Unity to read the audio file? Lots of the audio files on the iOS Library are likely m4a, and I was wondering if it is at all possible for Unity to be able to read these files?

I know the audio files unity supports, and that m4a is no longer one of them. But I am wondering if there is any way to encode audio files that are copied from the library. I am aware of LAME and FFmpeg, but there are some problems with these. FFmpeg requires you to release your source code if you use it, and I also believe that I would not be able to submit my App if it includes those custom frameworks.

Is there absolutely any way that I would be able to read most audio files from the iOS Library, besides mp3? My game will likely depend on these files.

If I cannot use m4a, would you suggest me limiting my app to just mp3? This is really NOT what I want to do, but if there is no other way, it might necessary. The other option is to have the user upload the m4a to a server, which quickly encodes it, and sends it back. The problem with this solution is that it requires the user to have a internet connection, which is not ideal for many games.

Thanks for your time,

-Kyle

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by hunterleaman · Feb 22, 2015 at 04:05 PM

One possible alternative might be to convert the m4a to mp3 on unity's side but that would be pretty heavy. I published a package that accesses the music library, loads and controls playback of a song though, you can find it here http://partycircl.es/unity-assets/ios-music-library-access or on the asset store

Comment
Add comment · 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
0

Answer by Rouge Digital · Jul 03, 2016 at 09:45 PM

I maid an Asset play mp3 files, it works on Win, Max, Linux, iOS, android...

It works for local mp3 files and web streams, but could be upgraded to work against m4a or other formats.

I could or you could add a m4a file decoder to uAudio, it is just a custom audio parsing script.

I am currently adding .ogg decoding but I could be convinced to add m4a.

Asset - [uAudio: Mp3 Player/Streamer][1]

Comment
Add comment · 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

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

iOS build - Pointing to the right Xcode 1 Answer

iAd Interstitial Will Not Display 0 Answers

Admob iOS integration with Xcode Version 6.3 1 Answer

"Culture name neutral is not supported" when using Parse.Unity.dll 2 Answers

iOS.RemoteNotification userInfo empty 2 Answers


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