diff options
| author | Andre Weissflog <floooh@gmail.com> | 2018-09-26 10:18:06 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2018-09-26 10:18:06 +0200 |
| commit | 80c51617a108aa35105495574cfec127f2201d5a (patch) | |
| tree | cbf447ef3cc2bab1a2c801dea0dd963948939db9 /sokol_audio.h | |
| parent | 6eb29e6beda479bcbf099d7d51e899ce3a1c42d4 (diff) | |
docs: saudio_init -> saudio_setup, doh
Diffstat (limited to 'sokol_audio.h')
| -rw-r--r-- | sokol_audio.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sokol_audio.h b/sokol_audio.h index 649f469f..700734a5 100644 --- a/sokol_audio.h +++ b/sokol_audio.h @@ -90,7 +90,7 @@ WORKING WITH SOKOL AUDIO ======================== - First call saudio_init() with your preferred audio playback options. + First call saudio_setup() with your preferred audio playback options. In most cases you can stick with the default values, these provide a good balance between low-latency and glitch-free playback on all audio backends. @@ -101,11 +101,11 @@ Use push model and default playback parameters: - saudio_init(&(saudio_desc){0}); + saudio_setup(&(saudio_desc){0}); Use stream callback model and default playback parameters: - saudio_init(&(saudio_desc){ + saudio_setup(&(saudio_desc){ .stream_cb = my_stream_callback }); @@ -133,7 +133,7 @@ playback. To get the actual parameters, call the following functions after - saudio_init(): + saudio_setup(): int saudio_sample_rate(void) int saudio_channels(void); @@ -163,7 +163,7 @@ THE STREAM CALLBACK MODEL ========================= To use Sokol Audio in stream-callback-mode, provide a callback function - like this in the saudio_desc struct when calling saudio_init(): + like this in the saudio_desc struct when calling saudio_setup(): void stream_cb(float* buffer, int num_frames, int num_channels) { ... } @@ -198,7 +198,7 @@ ============== To use the push-model for providing audio data, simply don't set (keep zero-initialized) the stream_cb field in the saudio_desc struct when - calling saudio_init(). + calling saudio_setup(). To provide sample data with the push model, call the saudio_push() function at regular intervals (for instance once per frame). You can |