mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Update documentation for examples.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user