I want to decode audio from a buffer or audio file and write it to a buffer for playback (I don't want to route it directly to the hardware) on macOS and iOS. I want to be able to convert it to another format too if supported. What classes/services should I use from AVFoundation/CoreAudio API to do that?