Dynamic memory allocation in Audio library