GetBufferCount
Syntax
GetBufferCount(buffer: number): numberParameters
Return Value
Description
Example
// Get the count of values in buffer 0
const count = this.api.GetBufferCount(0);
// Use the count to iterate through all values in the buffer
for (let i = 0; i < count; i++) {
const value = this.someBuffer.getValue(i);
// Process the value
}
// Check if there are enough values for calculations
if (this.api.GetBufferCount(0) >= period) {
// Perform calculations that require at least 'period' values
}Last updated