Amplify sounds?

Hello there!

I am using this:


and the highest volume is 1.0 which I can’t change higher.
I am trying to make a “gunshot” sound which I want to make VERY loud so players around the entire map (kinda close) will hear it but the volume of 1.0 (the highest) is not very loud for a gun shot at all…
Any help please?

Changing the volume isn’t going to help you here - the problem is the falloff, which determines the way the sound gets quieter over distance.

AudioSource.PlayClipAtPoint doesn’t let you control the falloff settings at all. You’re going to need to play the sound a different way - for example, by spawning your own GunshotSound prefab that has an AudioSource on it with custom falloff settings.

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 <strike>= clipSampleData ~~* multiplicationFactor; // to multiply the sound by 2 set "multiplicationFacteur = 2f;"~~</strike>


// save samples in audio clip
inAudioClip.SetData(clipSampleData, 0); // the volume of inAudioClip should be higher

this may sound simple, but just make all of your other sounds quieter so the gunshot is heard above them. you need to think about the overall sound design and making sure that important sounds are heard when required, and at the appropriate relative volume.