Can some one explain this part of code found in the
If I have understood correctly,
But why it is also incremented if
In all other analyze objects the
update()
function of analyze_rms.cpp:
Code:
audio_block_t *block = receiveReadOnly();
if (!block) {
count++;
return;
}
If I have understood correctly,
count
is incremented once every time if an audio block is analyzed. It therefore represents the number of analyzed blocks. If count
is > 0, data is available. Calling read()
resets count
to 0.But why it is also incremented if
block
is zero/null? available()
would return true
but read()
would return 0 (if no other blocks are analyzed yet).In all other analyze objects the
update()
function starts like this:
Code:
block = receiveReadOnly();
if (!block) return;