• 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
Question by thanansan · Aug 19, 2014 at 11:40 AM · audiomp3wav

Is it efficient to use .mp3, rather than using .wav?

Run time memory perspective, which format is effective (.mp3 or .wav).?

Comment
NateJC
wsssixteen
dreg_master
jethrogillgren
shieldgenerator7
OnatKorucu
joan-bdm

People who like this

7 Show 1
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 Kiwasi · Aug 20, 2014 at 05:45 AM 0
Share

My understanding was that it all gets compressed into a platform specific format anyway? But I could be wrong

3 Replies

· Add your reply
  • Sort: 
avatar image

Answer by senc01a · Aug 19, 2014 at 11:44 AM

Mp3 is compressed, as opposed to Wav which is (generally speaking) raw Data. Wav uses more memory, but mp3 requires more processing power. Its an interesting trade-off, although as most devices have built-in mp3 and mp4 hardware decoder, I believe that using mp3 is a better solution. This is in general applicable for music, as for general sounds (interface and so on), perhaps it is better to use wav.

So generally speaking I believe that the best practices are:

  • Mp3 for long sound files (Music and ambient sounds)

  • Wav for small sound files (Interface and game sounds)

You can find additional discussion on the topic in the following links:

Mp3 Vs Wav

Small audio files

Comment
Scribe
Arkaid
x0r
wsssixteen
jethrogillgren
Baris-B
shieldgenerator7
OnatKorucu
octavioroar
joan-bdm

People who like this

10 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 thanansan · Aug 20, 2014 at 05:16 AM 0
Share

Thank you for the answer. But, from my observation by running the profiler

1 MB of .wav file is equal to around 0.4 MB of .mp3 file. But, we know the compression (encoding) is better than .mp3. And, during the run time of the game, .mp3 file take more run time memory than .wav. Because of decoding of .mp3 (.mp3 is compressed & .wav is uncompressed).

avatar image

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

for efficiency I would recommend you look at a rolling buffer so you dont have to keep the full music file in memory.

I maid an Asset to do just this, it works on Win, Max, Linux, iOS, android...

Asset - uAudio: Mp3 Player/Streamer

Comment

People who like this

0 Show 0 · 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

Answer by Kreathe · Aug 18, 2017 at 10:00 AM

first, let's take a look at several formats, source from: https://www.lifewire.com/different-types-of-music-files-3134920 MP3: Designed by the Moving Pictures Experts Group (MPEG), an organization that develops standards for coded audio and video programs, the MPEG-1/MPEG-2 Layer 3 (MP3) is arguably the most prolific and supported audio file type. MP3 is both a compressed and lossy audio format, with bit rates ranging from 8 kbit/s up to a maximum of 320 kbit/s, and sampling frequencies ranging from 16 kHz to a maximum of 48 kHz. The smaller file sizes of MP3s means faster file transferring and less space used, but at the cost of a reduction in sound quality (versus lossless). WAV: Also developed by Microsoft, the Waveform Audio File Format (WAVE, or more commonly known as WAV) is a standard for Windows-based systems and compatible with a variety of software applications. WAV is both an uncompressed (but can also be coded as compressed) and lossless audio format, essentially an exact copy of the source data. Individual files can take up a significant amount of space, making the format more ideal for archiving and/or audio editing. WAV audio files are similar to PCM and AIFF audio files. But if I were you, I will convert them freely and choose the best one I like, http://www.videoconverterfactory.com/tips/m4a-to-wav.html I am usually using wav format for high quality. cheers

Comment

People who like this

0 Show 0 · 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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

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

Related Questions

Converting .wav to .mp3 0 Answers

Best Audio File Format Practices? iOS/Unity 1 Answer

How I can prevent music from stopping after changing a scene? 3 Answers

Why Won't My Audioclip Loop Seamlessly? 1 Answer

MP3 to OGG Converter, Plugin, Command Line to be used with Unity 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