AudioSelector
This commit is contained in:
1 parent
7ec6ede19a
commit
e12f876255
24 files changed
+590
-412
No files matched your search
@@ -0,0 +1,23 @@
|
||||
using Assets.WasapiAudio.Scripts.Unity;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
public class AudioSelector : MonoBehaviour {
|
||||
public WasapiAudioSource[] sources;
|
||||
private int sources_i = 0;
|
||||
|
||||
void Awake() {
|
||||
sources_i = 0;
|
||||
Debug.Log($"{sources[sources_i]}");
|
||||
}
|
||||
|
||||
public void UseNextSource() {
|
||||
sources_i = (sources_i + 1) % sources.Length;
|
||||
}
|
||||
|
||||
public WasapiAudioSource CurrentSource() {
|
||||
return sources[sources_i];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user