🤖 AI: CSound::onAudioInput copies the driver's buffer into a fixed-size vector, then compares the frame count it was handed with the one it asked for.
The copy writes numFrames * getChannelCount() samples into vecsTmpInputAudioSndCrdStereo, which Init sizes once to iOboeBufferSizeStereo. The comparison that would catch numFrames exceeding iOboeBufferSizeMono sits on the next line and only logs.
The resize above it is not a bound: it runs only while mCountCallbacksToDrain is above zero — the discard period right after start — and it sizes from getBytesPerFrame() rather than from a sample count. Once the drain ends, nothing resizes and nothing checks before the copy.
It has not been seen firing. Thirteen stream transitions on a Galaxy S22 produced no mismatch log, so Oboe honoured the requested size throughout that run. What is missing is anything that makes it so.
Raised as asked on #3873, after re-measuring all five findings on current main: three did not survive as written, one belongs to #3798, and this is the remainder.
🤖 This message was written by AI and reviewed by @mcfnord.
🤖 AI:
CSound::onAudioInputcopies the driver's buffer into a fixed-size vector, then compares the frame count it was handed with the one it asked for.The copy writes
numFrames * getChannelCount()samples intovecsTmpInputAudioSndCrdStereo, whichInitsizes once toiOboeBufferSizeStereo. The comparison that would catchnumFramesexceedingiOboeBufferSizeMonosits on the next line and only logs.The
resizeabove it is not a bound: it runs only whilemCountCallbacksToDrainis above zero — the discard period right after start — and it sizes fromgetBytesPerFrame()rather than from a sample count. Once the drain ends, nothing resizes and nothing checks before the copy.It has not been seen firing. Thirteen stream transitions on a Galaxy S22 produced no mismatch log, so Oboe honoured the requested size throughout that run. What is missing is anything that makes it so.
Raised as asked on #3873, after re-measuring all five findings on current
main: three did not survive as written, one belongs to #3798, and this is the remainder.🤖 This message was written by AI and reviewed by @mcfnord.