weighted average in audio callback