void Update ()
{
if (Input.GetKeyDown (KeyCode.Mouse0)) {
mySources = this.gameObject.GetComponent ();
selectedDevice = Microphone.devices [0].ToString ();
mySources.clip = Microphone.Start (null, true, 10, 16000);
while (!(Microphone.GetPosition(selectedDevice) > 0)) {
}
mySources.Play ();
}
if (Input.GetKeyUp (KeyCode.Mouse0)) {
AudioClip clip = mySources.clip;
mySources.Stop ();
Microphone.End (selectedDevice);
}
}
void OnAudioFilterRead (float[] samples, int channel)
{
}
Hi All.
My App will crash (iOS) with this code when I select IL2CPP but when i Select Mono2x It is OK,How to solve the problem?Thanks.
↧