pub unsafe extern "C" fn oboe_AudioStream_waitForAvailableFrames(
    this: *mut oboe_AudioStream,
    numFrames: i32,
    timeoutNanoseconds: i64
) -> oboe_ResultWithValue<i32>
Expand description

Wait until the stream has a minimum amount of data available in its buffer. This can be used with an EXCLUSIVE MMAP input stream to avoid reading data too close to the DSP write position, which may cause glitches.

Starting with Oboe 1.7.1, the numFrames will be clipped internally against the BufferCapacity minus BurstSize. This is to prevent trying to wait for more frames than could possibly be available. In this case, the return value may be less than numFrames. Note that there may still be glitching if numFrames is too high.

@param numFrames requested minimum frames available @param timeoutNanoseconds @return number of frames available, ErrorTimeout