Audio Buffer
Audio buffer containing PCM data from recording.
Properties
Duration of this buffer in milliseconds
Number of samples in this buffer. For mono: frameCount = sampleCount For stereo: frameCount = sampleCount / 2
Sample rate of this audio buffer in Hz
Lazily computed float samples, normalized to -1.0, 1.0. This avoids allocation if float data is not needed.
Absolute monotonic nanoseconds at the moment the LAST sample in this buffer was captured at the microphone. Lives in the same time domain as com.musicmuni.voxatrace.internal.platform.nowMonotonicNanos, Android's AudioTimestamp.nanoTime, and iOS's AVAudioTime.hostTime. The OS audio pipeline already accounts for input latency in this value — downstream consumers do not need to subtract SonixRecorder.inputLatencyMs again. Monotonic across buffers from the same recorder instance; its absolute value is only meaningful relative to other readings in the same monotonic domain on the same device.
Functions
Fill a pre-allocated FloatArray with normalized samples. This is the zero-allocation path for real-time DSP.
Convenience method to get samples as FloatArray. Equivalent to accessing the lazy samples property.