Android/Oboe Buffer Sizes

I know bufferSizes are an expected value and can change, but I have a condition where in the prepareToPlay method the size is 1440 but in the getNextAudioBlock it is 240.

The 240 is great, as I want as lowLatency as possible… but why the 1440 first?

And what, if anything can I do about this except structure my code to avoid the mismatch down the line?

cc @Don_Turner

a quick update to this, this 1440 comes from device->getCurrentBufferSizeSamples() which is called and used as the parameter when i initiate the prepareToPlay

further edit: when this changes, is possible to get notified in juce?

1 Like

+1 for this - currently I have to query Android via JNI to know the buffer size before the audio thread starts from PROPERTY_OUTPUT_FRAMES_PER_BUFFER

1 Like