WaveOculusDemoProject.Audio.SoundManager.Play C# (CSharp) Method

Play() public method

Play a sound and return its instance
public Play ( SoundType sound, bool loop = false ) : SoundInstance
sound SoundType The sound type
loop bool Indicate if the sound must be looped
return SoundInstance
        public SoundInstance Play(SoundType sound, bool loop = false)
        {
            var list = this.soundDictionary[sound];
            int id = this.random.NextInt() % list.Length;
            var soundInfo = list[id];

            return this.soundPlayer.Play(soundInfo, 0, loop);
        }