- Home /
Question by
yijsw · Sep 11, 2019 at 01:45 AM ·
audiosourcecomponentaudioclipmicrophone
Microphone Question
I'm working on incorporating a feature where users can record their voice and the game saves it onto a game character. However, when I tried to use the code in https://docs.unity3d.com/ScriptReference/Microphone.Start.html, I get this awful, high-pitched, scratching noise when the audio clip plays. I am unsure as to what may be causing this issue.
Here is the code below if you wish to not go to the page link above:
AudioSource audioSource = GetComponent<AudioSource>();
audioSource.clip = Microphone.Start("Built-in Microphone", true, 100, 44100);
audioSource.Play();
Comment