Skip to content
Moros Smith edited this page Aug 26, 2022 · 12 revisions

Introduction

You wanted noise? Well is this loud enough? - javidx9

What is this?

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!

Table of Contents

Getting Started

Setting Up Your Environment

Linux

MacOS

Windows

Emscripten

Usage

Single-File Projects

TODO: example project code

Multiple-File Projects

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"
Clone this wiki locally