fasadharmony.blogg.se

Unity audioclip getdata incomplete
Unity audioclip getdata incomplete









  1. #UNITY AUDIOCLIP GETDATA INCOMPLETE ANDROID#
  2. #UNITY AUDIOCLIP GETDATA INCOMPLETE CODE#

This release of Unity primarily contains fixes to Unity 3.5.

#UNITY AUDIOCLIP GETDATA INCOMPLETE CODE#

I get that i can filter this and whatever, but i am trying to figure out if my code is wrong, or Unity's audio clip reading/filling is bugged in general. As a result i can't get the perfect measurements i need.

#UNITY AUDIOCLIP GETDATA INCOMPLETE ANDROID#

I see this happen on both PC and Android builds (Android build seems worse). As if that frame has corrupted or incomplete microphone data. As in, it tries to read a frequency, and for 1 frame it is thrown completely off. So to me it seems that the microphone is missing some data when it does it's wrapping on the audioclip. But i couldn't find any consistency there. I also checked the buffer content to verify i do not have any buffers with unexpected high/low values. Red line is frequency calculated (Notice the unwanted drops there)Īnd the blue line is Buffer size (Generally 440/880 per frame) (Just to make sure i am not dropping buffer or something) Legenda: Green line is lastMicPosition on that frame. I then feed this smaller buffer to my formula to determine frequency. In case of it having wrapped around i use: mySmallBufferSize = (audioClip.sample - lastMicPosition) - micPosition įloat mySmallBuffer = new float ĪudioClip.GetData(mySmallBuffer, mySmallBufferSize) I then work out my own buffer size for that frame by doing: mySmallBufferSize = micPosition - lastMicPosition I think this is a 1 second buffer if i recall correctly. I am filling a minimal size Audioclip with Microphone data. And the code was double checked with generated buffer values, which all come back fine and on the exact frequency. The frequency finder code has been proven to work on multiple platforms if the input is correct. I have been trying to get a frequency finder to work in Unity.











Unity audioclip getdata incomplete