Regarding Audio: Linux! = Mac, so I will answer separately.
MacOS uses basic audio for low-level audio. Based on this, there are several higher-level APIs. If you just want to play the sound file, most likely the path of the AV Foundation Framework . Here you will find an example to create a simple iOS application that can be easily ported to MacOS.
For Linux, the whole situation is rather delicate. There are many different frameworks and libraries, and it is very unlikely that it is low level or high level, as some of them imitate others. Basically there is ALSA and OSS for low level audio. Both of them are shit. Jack strives to provide the foundation for professional sound, but it's not very portable (at least if you're interested in embedded devices). Most Linux OSs currently use PulseAudio as their audio server, which also has a simple API for simple single-sound playback and a very complex API for low-level content. And then there is the gstreamer library, which is quite portable and has a half-descent API and is especially designed to play audio and video files and streams, and perhaps this is the way to work on Linux.
I personally recommend using PortAudio , which is a library that provides - as the name indicates - an audio system that is portable across multiple operating systems and audio systems . PortAudio is also well designed and has a simple but flexible API.
source share