If these sounds are 3D, I suspect that you don't have to worry about this: according to [the docs][1], sounds that are less audible (the farthest ones) are occluded first when there are more AudioSources than available mixer inputs (priority is also taken into account).
Anyway, I suppose that you could use a trigger to raise/lower the priority of each sound source: add or child a sphere trigger of the desired radius (range) to the player, and add also a kinematic rigidbody to it (moving triggers require a rigidbody, even kinematic), then place this code in every AudioSource:
function OnTriggerEnter(other: Collider){
// audio source inside player range:
audio.priority = 100; // set a higher priority
}
function OnTriggerExit(other: Collider){
// audio source out of player range:
audio.priority = 128; // restore default priority
}
NOTE: Every object having one of these AudioSources must also have a collider in order to be detected by the trigger (rigidbody not required).
[1]: http://docs.unity3d.com/Documentation/ScriptReference/AudioSource-priority.html
↧