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 antiwebbite · Apr 06, 2012 at 11:16 PM · iosaudiomemoryprofilercompression

iOS: Compressed audio not affecting memory?

Hello all,

I am experimenting with audio compression in our iOS game and the problem I am running into is that the profiler shows no difference whether files are compressed or uncompressed. Where am I going wrong/not understanding!? Details below...


Profiling
I am connecting via Wifi and profiling straight from the iPad using Unity's Profiler in the editor. When I reduce the sample rate, the amount of memory loaded decreases so I know that the profiler is at least registering differences in the builds.

I am looking at the "Audio" and "Memory" tabs in the profiler for information.

Audio is showing "Audio Memory: 5.7MB", which is close enough to what it should be uncompressed by my calculations.

Memory is showing "Audio Clips: 28/1.3MB", which I don't understand what the 1.3MB is referring too. This isn't in the docs from what I can find.

The above values never change no matter what my settings are in Unity, only if I adjust the source files.


Compression Settings
The following is applied to my SFX. Music is streamed and uncompressed (Native).

Audio Format: Compressed (MPEG)
Load type: Compressed in Memory
Hardware decoding: (unchecked since I read only one of these works at a time)
Compression (kbps): 156

It is applied and I see the new file size in the Preview window. I have also tried "Decompress on Load" which is supposed to give me a memory spike but again there is no change in the values.

Am I looking in the wrong place to see the changes? Am I misunderstanding a fundamental fact about mobile audio? Any help would be appreciated.

Thanks!

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 AdbC99 · Aug 25, 2012 at 04:26 PM

I've had loads of problems here, I found sometimes unity wasn't actually compressing the file at all, look at the size of the application. Whilst the file size changed in Unity, the conversion didn't take place, when you switch to compressed then there should be a progress bar appear while it does the conversion, if not then experiment with deleting a re-importing the samples and you should get there. There is one fundamental fact that you are missing about Unity iPhone audio, it is very very buggy.

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 XeviaN360 · Sep 12, 2012 at 03:01 PM

I really do not understand things here. If i set an mp3 to "stream from disc", according to profiler, is using much more memory than having it in ram.

And, i found that on my android device, 33% of the cpu is used to play music (a single mp3). Why? Didn't have the android phones an hardware decoder? (i have a samsung galaxy note)

And, cpu usage in the audio section of the profiler is totally apart from the cpu usage... i mean, if i sum all the cpu usage %, and the cpu usage % of audio profiler track, i have a nice 130%.

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

What is the unit of measurement for memory usage in the Unity internal iOS profiler? 0 Answers

why are all my app icons and splashscreens loaded in memory? 1 Answer

Memory usage in xcode does not equal to the number in unity profiler 0 Answers

"stream from disc" WAV/AIFF file allocates tons of memory 0 Answers

Memory Profile shows increased Audio size 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