GetOutputData time interval,Understanding the timing of GetOutputData() being called from Update or FixedUpdate
Hi All,
I have been following this thread to get a better understanding of the GetOutputData function: https://answers.unity.com/questions/157940/getoutputdata-and-getspectrumdata-they-represent-t.html
There are still some things I don't understand about this function that I couldn't find help in any place.
Specifically, what time interval does the data array returned represent and what are the best practices to calling this function from periodic update without getting any holes in the data or any overlapping?
The thread above suggested that given a data array of 1024 and sample rate of 48000, the time internal the data represent is around 21ms. Assuming this is accurate: 1. Does that represent the last 21ms that were played, or the upcoming 21ms? What happen if I provide an array very big that covers seconds of audio? 2. Is this the same if called from AudioSource vs. AudioListner?
Thanks, Shay
Your answer
![](https://koobas.hobune.stream/wayback/20220612183732im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Audio not playing when conditions are met. 0 Answers
Turning off Audio Interpolation for Tracker Music 0 Answers
I want the audio to play when the player nears the object, but fade away when they walk away. 0 Answers
I'm trying to do multiple AudioSources, but one won't play...... 0 Answers
Detecting when two different audio sources are emitting sound in Unity 0 Answers