Update documentation for examples.

This commit is contained in:
David Reid
2020-07-15 21:29:16 +10:00
parent b80f7f9491
commit 3d82237ee2
9 changed files with 91 additions and 12 deletions
+14
View File
@@ -1,3 +1,17 @@
/*
Demonstrates playback of a sine wave.
Since all this example is doing is playing back a sine wave, we can disable decoding (and encoding) which will slightly
reduce the size of the executable. This is done with the `MA_NO_DECODING` and `MA_NO_ENCODING` options.
The generation of sine wave is achieved via the `ma_waveform` API. A waveform is a data source which means it can be
seamlessly plugged into the `ma_data_source_*()` family of APIs as well.
A waveform is initialized using the standard config/init pattern used throughout all of miniaudio. Frames are read via
the `ma_waveform_read_pcm_frames()` API.
This example works with Emscripten.
*/
#define MA_NO_DECODING
#define MA_NO_ENCODING
#define MINIAUDIO_IMPLEMENTATION