caudio/README.md

2.3 KiB

cAudio

cAudio is a fine OpenAL wrapper with a modern, OOP-oriented API for C++.

AFAICS, it had been started by a dude named wildicv and's been taken over by another dude by the name of R4stl1n. They might even be the same guy, I don't know. Big cheers to both of them anyway.

The reason I forked this repo from GitHub is that it has been abandoned and its CMake configuration has gone stale for more recent versions. Moreover, x64 builds on Windows were an impossible task. This repo here corrects both. Some fixes are rather makeshift yet, but it does the job.

As the original repo, this one also provides the OpenAL deps for Windows in binary form. On other platforms, OpenAL is assumed as a sys dependency.

How To Build

It's a lib and intended to be integrated in your CMake-based software project, ideally as a git submodule. For pointers, this is how I like to set it up in my projects:

set(CAUDIO_TARGET cAudio)
set(CAUDIO_DIR <path to cAudio>/cAudio)
set(CAUDIO_INC_DIR <path to cAudio>/cAudio/cAudio/include)
add_subdirectory(${CAUDIO_DIR} EXCLUDE_FROM_ALL)

You might wanna check the CMake config from my project flasim.

On UNIXoids (no confirm yet it also builds on Mac) it assumes the libraries OpenAL and libOGG (including development options, if your OS distinguishes) avail and ready.

On Windows these dependencies are included, else it'd get too complicated - but you need to instruct CMake where to find them. Use the CAUDIO_DEPENDENCIES_DIR variable to point to the deps for your build. Make it point to the cAudio/Dependencies folder for a 32bit build and cAudio/Dependencies64 for the x64 option. For example, when using the commandline, do this: cmake -DCAUDIO_DEPENDENCIES_DIR=<path to>/cAudio/Dependencies[64?] (...)

Compile As A System Lib

If you're on an Arch Linux based OS, you're lucky. Find cAudio on the AUR.

If you're not and want to do this, you're on your own. The original cAudio supported this and it might still work but I don't maintain this atm.

Note On C++ Standards

While this version of cAudio builds fine on the latest fully supported C++17 standard on GCC, MSVC has some compile issues with spec'd standards above C++11.