AudioPlusPlus (A++) is an early development audio playback library designed for easy integration with any programs.
A++ aims to be an easy to use and develop audio library that plugs straight into your program. It does all the interaction between many great open source audio libraries for you.
A++ is currently in very early development stages. Please consider helping by checking out the roadmap.
AudioPlusPlus can be built using CMake through the following steps.
- Clone this repository to your machine using
git clone https://github.com/callumc34/AudioPlusPlus
and move into the directorycd AudioPlusPlus
- Setup the build directory
mkdir build
cd build
- Install the dependencies for this project:
The preferred way to install dependencies on Windows is using Microsoft's VCPKG manager.
When running the following command, vcpkg will automatically install all the required dependencies.
cmake .. --toolchain [path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=[architecture-platform-static/dynamic(leave blank)]
For linux the majority of these packages can be installed using the package manager.
sudo apt install doxygen libasound2-dev libsndfile-dev libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev libmpg123-dev libtag1-dev
PortAudio is currently outdated on package manager and thus the most recent version must be manually built and installed. SpdLog currently does not work when installed with package manager and thus must be manually built and installed.
Note: These packages may be out of date and not provide full functionality - see alternative for a better option.
Some of the packages installed using the linux package manager may be out of date or lack full functionality.
It is recommended on linux that you manually build both portaudio and sndfile.
The program will output the urls of all the packages so that you can build them yourself.
Note: CMake on windows can have trouble finding the installed packages - use the option -DDEPENDENCIES_ROOT=[Path to install location of dependencies]
to aid CMake in finding them.
- Build the project
cmake --build .
cmake --install .
You can pass additional options with -D<parameter>=<value>
when you run
cmake
command. Some useful system options:
If you built your own dependencies and installed them using cmake --install
on windows the best way to let CMake find the packages is with the following variables
DEPENDENCIES_ROOT
- Install location of the following packages. On linux if the packages were installed to the default prefix CMake should be able to find them without the need for any variables.
Or specify where to find each package individually
FLAC_ROOT
- Install location of FLAC PackageLAME_ROOT
- Install location of LAME files with structure/include
and/lib
MPG123_ROOT
- Install location of MPG123 PackageOGG_ROOT
- Install location of OGG PackageOPUS_ROOT
- Install location of OPUS packagePORTAUDIO_ROOT
- Install location of PortAudio packageSNDFILE_ROOT
- Install location of libsndfile packageSPDLOG_ROOT
- Install location of spdlog packageVorbis_ROOT
- Install location of vorbis packageTAGLIB_ROOT
- Install location of Taglib package
ENABLE_SNDFILE
- Build without using SndFileBUILD_EXAMPLES
- Builds the example programsENABLE_PACKAGE_CONFIG
- Generate and install package config file.INSTALL_PKGCONFIG_MODULE
- Generate and install pkg-config module.BUILD_WITH_LOGGING
- Build with logging support (requires SpdLog)CMAKE_INSTALL_PREFIX
- build install location, the same as--prefix
option ofconfigure
scriptENABLE_STATIC_RUNTIME
- enable static runtime on Windows platform (MSVC and MinGW),OFF
by default.BUILD_DOCUMENTATION
- Builds the doxygen documentation,
Check out the examples folder for how to integrate into your app.