private IEnumerator WaitForBuffer(RecordingSound recordingSound) { RESULT result = RESULT.OK; while (recordingSound.recordPos < Settings.Instance.RecordingLatency) { bool recording = false; result = LowLevelSystem.isRecording(recordingSound.driver.id, out recording); if (!recording) { recordingSound.Stop(); continue; } else { result = LowLevelSystem.getRecordPosition(recordingSound.driver.id, out recordingSound.recordPos); CheckResult(result, "FMOD.GetRecordPosition"); } yield return(null); } PlayRecording(recordingSound); yield return(null); }