fixed audio

This commit is contained in:
sin365 2025-02-18 17:47:18 +08:00
parent 113ea59fe9
commit fa20ac8521

View File

@ -14,12 +14,6 @@ public class UEGSoundPlayer : MonoBehaviour//, ISoundPlayer
public double audioFPS { get; private set; } public double audioFPS { get; private set; }
public bool IsRecording { get; private set; } public bool IsRecording { get; private set; }
float lastData = 0;
private AudioClip audioClip;
private int writePos = 0;
private float[] buffer;
void Awake() void Awake()
{ {
// »ñÈ¡µ±Ç°ÒôƵÅäÖà // »ñÈ¡µ±Ç°ÒôƵÅäÖÃ
@ -44,7 +38,6 @@ public class UEGSoundPlayer : MonoBehaviour//, ISoundPlayer
Debug.LogError("Failed to update audio settings."); Debug.LogError("Failed to update audio settings.");
} }
GetComponent<AudioSource>().PlayOneShot(audioClip);
} }
private Queue<float> sampleQueue = new Queue<float>(); private Queue<float> sampleQueue = new Queue<float>();