Audio callback

to me it seems like variables defined and used inside the audio
callback
function
are not guaranteed to be persistent. I tried with several variables:
when i place
them outside the callback function they keep their values, when i put
them in the
function they change (reinitialize) with every call.

That’s the expected behavior for local variables, except if you declare
them as static.

Hi,

to me it seems like variables defined and used inside the audio callback
function
are not guaranteed to be persistent. I tried with several variables:
when i place
them outside the callback function they keep their values, when i put
them in the
function they change (reinitialize) with every call.

Could one confirm that this is true (or not) please?
Otherwise i’d have some serious bugs in my code :-]

Thanks & greetings,
Leander

That’s the expected behavior for local variables, except if you declare
them as static.

Thanks a lot! With ‘static’ everything is correct now.

Leander