moving common audioengineprivate functions to header