some refactoring for sample addition in audio mixer