Improved handling of AudioOutputInterface by using shared pointer to ensure lifetime validity