In my program, I want to record the sound of microphone to a list of float array, then use audioSource.clip.SetData() to put the list into un audioclip, so that I can play the sound of microphone.
But if I set the length of each float array of sound from microphone to 256, that’s to say I will many float array of 256 to record the sound. And when I play the audiosource, there is no sound at all, just silence. what’s more, if I don’t set the length of loat array to 256, that’s to say, just save the audio clips of microphone into the list of float arrays with various lengths, and then the audiosource can play well after audioSource.clip.SetData().
Wish anyone could help.