andrew audioFramesElapsed gives you the number of audio samples since the very first call to render()
Sorry for the possibly dull question, but I could really use some stone-cut clarification here: what is the difference from an audio sample and an audio frame in the Bela environment? I know what a sample is, and I understand samplerate - but the term "frame" is not quite clear to me. @andrew states here that frames and samples are the exact same thing, as far as I can tell. Is that really the case?
EDIT: reading more up on this, I understand it this way: 'block' and 'frame' denotes the same concept, and they consist of audio samples. You set this in Bela under project settings "Block size (audio frames)", and it's usually 16 - which means one frame/block consists of 16 samples. Am I completely off here?
EDIT II: Just went back here: https://github.com/BelaPlatform/Bela/wiki/Introduction-to-Bela-Code which explains it pretty dead-on I guess. So a frame is the exact same thing as a sample, except it's looking at ALL channels at once. So the concept of "buffer size" in a DAW is the same as block size here, I assume.