-
Notifications
You must be signed in to change notification settings - Fork 20
Home
You wanted noise? Well is this loud enough? - javidx9
olc::SoundWaveEngine is a single file, cross platform audio interface for lightweight applications that just need a bit of easy audio manipulation.
It's origins started in the olcNoiseMaker file that accompanied javidx9's "Code-It-Yourself: Synthesizer" series. It was refactored and absorbed into the "olcConsoleGameEngine.h" file, and then refactored again into olcPGEX_Sound.h, that was an extension to the awesome "olcPixelGameEngine.h" file.
Alas, it went underused and began to rot, with many myths circulating that "it doesn't work" and "it shouldn't be used". These untruths made javidx9 feel sorry for the poor file, and he decided to breathe some new life into it, in anticipation of new videos!
Currently olcSoundWaveEngine has support on Linux, MacOS, and Windows using various compiler/toolchains, including Emscripten. We've done our best to provide details specific to each platform that we support. (Currently the instructions are evolving as the project matures).
- Linux Setup and Build Instructions
- MacOS Setup
- Windows Setup and Build Instructions
- Emscripten Setup and Build Instructions
You can see some examples in the demos folder of the repository.
TODO: example project code
If you intend to use olcSoundWaveEngine across multiple files, it's important to only have one instance of the implementation. This is done using the compiler preprocessor definition: OLC_SOUNDWAVE
This is defined typically before the header is included in the translation unit you wish the implementation to be associated with. To avoid things getting messy I recommend you create a file olcSoundWaveEngine.cpp
and that file includes ONLY the following code:
#define OLC_SOUNDWAVE
#include "olcSoundWaveEngine.h"