24 lines
516 B
C#
24 lines
516 B
C#
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];
|
|
}
|
|
}
|
|
|