Audio library for Windows, Mac and iOS? OpenAL / OpenSL

I am writing a Desktop / iOS game with OpenGL and want to play audio files (mp3 or wav). I have already worked with CoreAudio and AudioQueues, but now I need something that works with Windows (and possibly Linux too).

I have seen so far:

  • Openal
  • Opensl

I need only basic functions like "playSound (file)" and "isPlaying (file)" - there is no 3D sound, effects, etc ... OpenAL and OpenSL - both from khronos - so I really don’t get difference (yes, these are two different libraries).

What will be the easiest cross plate? Can I write code with one of them that works on iPhone and desktop PCs similar to each other?

+4
source share
1 answer

If your target platforms are Windows / Mac / iOS, then OpenAL is an excellent choice that is supported on all of these platforms. The place where you will need to write cross-platform code is how you open and decode your files.

+3
source

All Articles