/// <param name="position">Position at which it will be played</param>
/// <param name="volume"></param>
/// <param name="pitch"></param>
/// <param name="spread">How 'wide' the panning will be in 3d. 0 means it will be heard from only one direction, 180 is all around, 360 is opposite direction.</param>
/// <param name="minDistance">The distance at which source volume will be 1 and falloff. Technically this is the sound intensity.</param>
/// <param name="mixerGroup">Add source to mixer group</param>
/// <param name="parent">A transform to attach source to. Position is still world position before parenting.</param>
/// <returns></returns>
publicstaticAudioSourcePlay(
thisAudioClipclip,
Vector3position,
floatvolume=1,
floatpitch=1,
floatspread=DEFAULT_SPREAD,
floatminDistance=DEFAULT_MIN_DISTANCE,
AudioMixerGroupmixerGroup=null,
Transformparent=null)
{
if(volume==0)returnnull;
if(pitch==0)returnnull;
Debug.Assert(clip!=null,"No AudioClip was passed");
/// Plays a random AudioClip from an array at a position
/// </summary>
/// <param name="clips">An array of AudioClips</param>
/// <param name="position">Position at which it will be played</param>
/// <param name="volume"></param>
/// <param name="pitch"></param>
/// <param name="spread">How 'wide' the panning will be in 3d. 0 means it will be heard from only one direction, 180 is all around, 360 is opposite direction.</param>
/// <param name="minDistance">The distance at which source volume will be 1 and falloff. Technically this is the sound intensity.</param>
/// <param name="mixerGroup">Add source to mixer group</param>
/// <param name="parent">A transform to attach source to. Position is still world position before parenting.</param>
/// <param name="noRepeatSwap">Swaps the order of array so that the same clip never plays twice in succession. Changes the order of clips in the input array.</param>
/// <returns></returns>
publicstaticAudioSourcePlay(
thisAudioClip[]clips,Vector3position,
floatvolume=1,floatpitch=1,
floatspread=DEFAULT_SPREAD,
floatminDistance=DEFAULT_MIN_DISTANCE,
AudioMixerGroupmixerGroup=null,
Transformparent=null,
boolnoRepeatSwap=false)
{
Debug.Assert(clips!=null,"NAudio: Clips array is null");
Debug.Assert(clips.Length!=0,"NAudio: No clips in array");