From ddabf406a46a5b2058da9700991bee0759fe2eff Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 14 Nov 2016 20:19:30 +1000 Subject: [PATCH] Update example code in documentation. --- mini_al.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mini_al.h b/mini_al.h index 888b6338..a05aadc1 100644 --- a/mini_al.h +++ b/mini_al.h @@ -70,6 +70,12 @@ // // ... // +// mal_context context; +// if (mal_context_init(NULL, 0, &context) != MAL_SUCCESS) { +// printf("Failed to initialize context."); +// return -3; +// } +// // mal_device_config config; // config.format = mal_format_f32; // config.channels = wav.channels; @@ -82,7 +88,7 @@ // config.onLogCallback = NULL; // ... nor do we care about logging (but you really should in a real-world application). // // mal_device device; -// mal_result result = mal_device_init(&device, mal_device_type_playback, NULL, &config, pMyData); +// mal_result result = mal_device_init(&context, mal_device_type_playback, NULL, &config, pMyData, &device); // if (result != MAL_SUCCESS) { // return -1; // }