Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void StartRecording()
- {
- System.Diagnostics.Stopwatch sw1 = new System.Diagnostics.Stopwatch();
- sw1.Start();
- if (!Microphone.IsRecording(null))
- {
- m_ForcedStopRecording = false;
- m_RecordingStartTime = Time.time;
- Debug.Log("ms before start microphone 2: " + sw1.ElapsedMilliseconds);
- m_RecordedAudio = Microphone.Start(null, false, m_MaxRecordingLengthInSeconds, m_RecordingFrequency);
- Debug.Log("ms after start microphone: " + sw1.ElapsedMilliseconds);
- StartCoroutine(WaitForRecordingTimeout());
- }
- Debug.Log("total StartRecording: " + sw1.ElapsedMilliseconds);
- }
Add Comment
Please, Sign In to add comment