sound distance between camera and audio source

How do I change the volume of the audio source depending on how far away the camera is so sounds won't seem right next to you, when they are really across the level. Do I have to get the distance between every audio source and the camera and adjust the volume depending on the distance. Or is there an easier way to do it.

This is calculated automatically when you make use of 3d sounds and have proper distances between source and listener.

Unity's default unit scale is 1 unit = 1 meter.

You need to respect the scale of units for audio to function properly. The same applies to physics.

Unity is doing this for you automatically, if you import the sound as 3D. You can tweak the details of the fall off in the curves in 3D options on the AudioSource.