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
0
Question by bugshake · Sep 08, 2012 at 12:19 PM · musicaudio sourceoggaudio clip

How can I improve OGG music quality?

I downloaded an mp3 music file that I want to play in the background of my game. It sounds terrible. The music actually slows down and speeds up, there's painful clicks all the time and the quality is very 'hard' like a bad radio or really high compression.

What I have tried that didn't work:

  • set sound to 2D

  • bypass all effects on playback

  • change sound priority

  • change compression quality (did have some effect ofc but didn't fix it)

  • change the load type

It is related to the computer it runs on. I have an AMD Athlon 64 Dual Core 5600+ which doesn't have the problem that much. It get's much worse on my Mobile Core i5 laptop.

The game btw is very CPU-heavy, because it generates a lot of the map in real time on a separate thread.

Oh, BTW, even if you can't help, I would be interested to know if other people also experienced problems with OGG playback on a normal desktop computer.

Thanks!

Comment
Add comment · Show 5
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 reptilebeats · Sep 08, 2012 at 12:31 PM 0
Share

what does it sound like outside of unity

avatar image bugshake · Sep 08, 2012 at 01:51 PM 0
Share

@reptilebeats Well, the source mp3 sounds fine, off course. Playing in the Unity Editor or as a built executable makes no difference.

avatar image bugshake · Oct 03, 2012 at 09:38 AM 0
Share

Update: I have a new, very fast computer now and the problem is no longer there. Apparently OGG is just a very bad codec in that if it doesn't get enough CPU time it will start playing raw bytes which is terribly painful to the ears (ins$$anonymous$$d of, for example, muting). Boggles my $$anonymous$$d anyone would accept such behaviour let alone in what is supposed to become a serious gamedev environment.

avatar image fafase · Oct 03, 2012 at 10:06 AM 0
Share

ogg is not that bad. I would think your issue is that you had a mp3 in the first place which is already a compression format, then you compressed again a compressed file which result in double loss of quality. You'd rather use a wav (if you can) that you convert to ogg. Then you will see the quality is not so bad.

avatar image Berenger · Nov 19, 2012 at 12:44 PM 0
Share

themipper says : I have the same problem and it doesn't seem to be a problem of the soundfile.

I generate a lot of meshes during runtime. The vertices, indices and normals are generated in separate threads (ThreadPool). Unity's main methods are not thread safe which means that the final steps of creating/updating the mesh, assigning it to the meshfilter and collider have to be done in the main thread.

This is the point where the problem originates. The music starts to stutter. It seems that the sound system is not running in its own thread which leads to the stuttering. Or the thread has a really low priority?

Does anybody know if there is a way to give the music thread a higher priority?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by dotJack · Oct 03, 2012 at 10:49 AM

The music actually slows down and speeds up

This is usually a matter of 3D sound and is caused by the doppler effect, used to emulate things going towards or moving away from the audio listener; This also applies to stuff like random panning, spread, etc.

If you are being affected by this, chances are you're using the sound in 3D and you're not applying the 2D settings, either way, you should probably turn the doppler down to 0.

there's painful clicks all the time and the quality is very 'hard' like a bad radio or really high compression.

use Audacity to convert it to OGG yourself - listen to it. If it's still horrible or if it is in fact horrible in the mp3 format, then it's not Unit'-s problem, if your version of the OGG is horrible, up the compression. I had this strange bug where the compression rates inside Unity didn't really change anything and I had to re-export a bunch of stuff by-hand and ignore Unity's own settings.

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

13 People are following this question.

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

Related Questions

Does creating several "audio players" load several AudioClips in the memory? 1 Answer

Array of AudioClips not playing, please help 3 Answers

Different music for pause menu? 1 Answer

How to play music/audio 2 Answers

Dynamic Backgroundmusic 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