I would like to play the sound get from Oculus Go's microphone through speaker in real-time, but could not made it. I have tried this code, it works well in Editor with headphone's microphone not with Oculus Go, or I have made some mistake?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
public class MicrophoneAudio : MonoBehaviour
{
void Start()
{
AudioSource micAudio = GetComponent<AudioSource>();
micAudio.clip = Microphone.Start(Microphone.devices[0], true, 10, 44100);
micAudio.loop = true;
while(!(Microphone.GetPosition(null) > 0)) { }
micAudio.Play();
}
}
Or this the device limitation? I already observed a lot but have no luck and found only start the microphone with no real time playback one. Hope anyone could help me.:(