Pergunta

In an effort to comply with licensing issues on our cross platform engine we have kept away from most libraries. But now it's time for audio, and OpenAL seems the best option. OpenAL uses LGPL, so we need to dynamically link it. This is fine on desktop platforms but gets tricky on mobile.

There are forks of OpenAL-soft for android that can link dynamically, but iOS does not allow dynamic linking. So here is the problem.

I heard that Apple has it's own implementation of OpenAL that we can use on iOS and OSX but were is it? When searching for OpenAL on Apple documentation I am directed to openal.org. This is not helpful.

So my question is does Apple have an implementation of OpenAL? If so how do I use it and statically link it into an iOS app and comply with laws?

Foi útil?

Solução

OpenAL is already built-in to iOS. You don't have to worry about licensing or legal issues.

To use it:

  1. Link your app against the OpenAL framework. In Xcode, find your app's target, select the "Build Phases" tab, open up "Link Binary with Libraries", press the + button, and add OpenAL.framework.

  2. In your code, import the headers like this:

#import <OpenAL/al.h>

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top