I want to store the data that is passed in OnAudioFilterRead
over two minutes. To do that I’m initialising the full data array at start but I can’t figure out a way to find the exact size. To do that I would need to know the size of data passed in the function, number of channels, and frequency of that functions ie how many time a second is it called. The unity documentation has not been helpful for this case.
Data I can find:
From GetDPSBufferSize:
bufferSize = 1024
numOfBuffers = 4
From AudioSettings:
outputSampleRate = 48000
speakerMode = 2
What I want to calculate:
bufferSize = 2048
What I cannot find:
frequency O fOnAudioFilterRead = ???
I need to be able to calculate this at runtime since the app will run on various devices with different capabilities.