- Home /
Question by
noxerr94 · Nov 21, 2017 at 11:57 AM ·
audioclipmicrophonerecording
Microphone start freezes app
Starting microphone completely freezes the entire application for 5 seconds (always 5 seconds). Unity 5.6.0f3
code:
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);
}
ms before start microphone 2 result says 0 ms after start microphone says 5011 Any suggestions?
Comment
Your answer
Follow this Question
Related Questions
Recorded Audioclip has more samples than it should. Why? 0 Answers
How can I use microphone to record and access to buffer in real time? 1 Answer
Microphone capture different channels 0 Answers
Microphone Stop Recording When FullScreenMovie Play 0 Answers
Microphone.GetComponent () not working + Microphone.devices empty? 0 Answers