Beispiel #1
0
 public override void Run()
 {
     AudioContext.Initialize();
     WavAudioSource source = new WavAudioSource("Resources/garbage_day.wav");
     AudioClip clip = new AudioClip(source);
     AudioEmitter emitter = new AudioEmitter();
     emitter.AddClip(clip);
     clip.Play();
     while (clip.State != AudioClipState.Ended)
     {
         emitter.Process();
     }
     AudioContext.Destroy();
 }
Beispiel #2
0
 public void RemoveClip(AudioClip clip)
 {
     _sources.Remove(clip);
 }
Beispiel #3
0
 public void AddClip(AudioClip clip)
 {
     _sources.Add(clip);
 }