Guest User

Untitled

a guest
Nov 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public void StartRecording()
  2. {
  3. System.Diagnostics.Stopwatch sw1 = new System.Diagnostics.Stopwatch();
  4. sw1.Start();
  5. if (!Microphone.IsRecording(null))
  6. {
  7. m_ForcedStopRecording = false;
  8. m_RecordingStartTime = Time.time;
  9. Debug.Log("ms before start microphone 2: " + sw1.ElapsedMilliseconds);
  10. m_RecordedAudio = Microphone.Start(null, false, m_MaxRecordingLengthInSeconds, m_RecordingFrequency);
  11. Debug.Log("ms after start microphone: " + sw1.ElapsedMilliseconds);
  12. StartCoroutine(WaitForRecordingTimeout());
  13. }
  14. Debug.Log("total StartRecording: " + sw1.ElapsedMilliseconds);
  15. }
Add Comment
Please, Sign In to add comment