- Home /
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
Answer by BinaryCaveman · Aug 31, 2010 at 08:37 PM
To increase the volume of your sounds, you could do either of these:
- 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.
- 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!
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
The $$anonymous$$aximum Volume is a Audio Source component property. See this page: http://unity3d.com/support/documentation/Components/class-AudioSource.html
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).
No-one really explained this: The maximum volume is 1.0, that's why setting it to 100 made no difference.
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)
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
Thanks, this worked for me. However, I had to change this:
float[] clipSampleData = new float[clip.samples * clip.channels];
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.
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.
Your answer
Follow this Question
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