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
3
Question by Christopher Winstanley · Aug 31, 2010 at 08:24 PM · audioaudiosourcevolume

Sound effects too quiet

Hi Everyone,

I am trying to add sound effects to my game and have them playing, yet they are really quiet when compared to my background music.

The audio source is attached to my game control object, which also has the Audio listener attached to it. I have my background music playing from the audio source, then the Audio Clips use the same audio source.

The code is:

private var thisAudio : AudioSource; var fire : AudioClip;

function Start() { audio.Play(); thisAudio = audio; }

function Update() { if(Input.GetButtonDown("Fire2")) { playSound(fire, 1.0); } }

function playSound(sound : AudioClip, playLength : float) {

     thisAudio.PlayOneShot(sound, playLength);


}

any help 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

8 Replies

· Add your reply
  • Sort: 
avatar image
6
Best Answer

Answer by BinaryCaveman · Aug 31, 2010 at 08:37 PM

To increase the volume of your sounds, you could do either of these:

  1. Change your sound effects to be stereo sounds (non-3D sounds). This makes them not vary in volume depending on distance. This might not be the best option if your sounds are coming from an object far away.
  2. Increase the audio source volume in the Inspector (make sure you increase the max volume also). This would be the best option of the two.

I hope this works for you!

Comment
Add comment · Show 4 · 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 Christopher Winstanley · Sep 01, 2010 at 10:01 AM 1
Share

What is the maximum volume? I have put it up to 100 as well as the volume. Can't really notice too much difference although I know the speaker on an iPhone is sucky

avatar image BinaryCaveman · Sep 01, 2010 at 11:08 PM 0
Share

The $$anonymous$$aximum Volume is a Audio Source component property. See this page: http://unity3d.com/support/documentation/Components/class-AudioSource.html

avatar image BinaryCaveman · Sep 01, 2010 at 11:09 PM 0
Share

Another option could be to lower the background music volume - you could use what I said above to increase the volume, but in the opposite direction (to something like 0.25).

avatar image Nition · Apr 07, 2013 at 04:48 AM 0
Share

No-one really explained this: The maximum volume is 1.0, that's why setting it to 100 made no difference.

avatar image
3

Answer by xpkoalz · Mar 25, 2015 at 03:25 PM

My app sound volume was fine until after I upgrade to Unity 5.0, it became inaudible...so need to make adjustments

In the Inspector > Audio Source > Settings: 1. 'Spatial Blend' to 0 (2D) 2. 'Stereo Pan' to 0 (both left and right speakers can hear)

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 Ingeniworks · Nov 26, 2015 at 03:55 PM 0
Share

this is brilliant! thumbs up for u!

avatar image
1

Answer by Akkadokk · Oct 09, 2017 at 03:30 PM

I increase inAudioClip's volume by doing that :

             // create sample array
             float[] clipSampleData = new float[inAudioClip.samples]; 
             // fill sample array
             inAudioClip.GetData(clipSampleData, 0);  
             // for each samples
             for (int s = 0; s < clipSampleData.Length; s++) 
             { 
                 // increase sample volume
                 clipSampleData[s] = clipSampleData[s] * multiplicationFactor; // to multiply the sound by 2 set "multiplicationFacteur = 2f;"
             } 
 
             // save samples in audio clip
             inAudioClip.SetData(clipSampleData, 0);  // the volume of inAudioClip should be higher
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 manuelmh · May 02, 2020 at 04:15 PM 0
Share

Thanks, this worked for me. However, I had to change this:

 float[] clipSampleData = new float[clip.samples * clip.channels];
avatar image
-1

Answer by robarintluck · Oct 20, 2014 at 09:51 AM

Sometimes even with the volume in the highest level, it still sounds very slight. In this case, you may prefer to some professional tools or guides.

You may refer to the following step by step guide on How to Increase Audio Volume in MP3, MP4, WAV, WMA, WMV, MKV, VOB, MPG.

It will help you increase sound for almost all audio and video files.

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 ickydime · Mar 17, 2017 at 03:38 PM

In addition to the other answers here you can also turn it up to 11 by adding an Audio Mixer to your AudioSource and increase the db output.

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
  • 1
  • 2
  • ›

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

11 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

Related Questions

Breathing volume increases as player gets more tired 0 Answers

How to duck a single audio channel? 0 Answers

Can 2 iTween components run on the same gameobject simultaneously? 2 Answers

Is there a way to limit the output volume on an audio mixer group? 1 Answer

Audio on object plays low in unity 5 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