From b5831564da2169bdfe2b47bb04083229835a6a2e Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 21 Oct 2016 13:25:58 +1000 Subject: [PATCH] Use C syntax highlighting for example. --- README.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index bb4aae02..c6f894bd 100644 --- a/README.md +++ b/README.md @@ -21,23 +21,10 @@ Example ======= mini_al will request and deliver audio data through callbacks. -``` -#define MAL_IMPLEMENTATION -#include "../mini_al.h" - -#define DR_WAV_IMPLEMENTATION -#include "dr_wav.h" - -#include - -// This is the function that's used for sending more data to the device for playback. +```c mal_uint32 on_send_frames_to_device(mal_device* pDevice, mal_uint32 frameCount, void* pSamples) { - drwav* pWav = (drwav*)pDevice->pUserData; - if (pWav == NULL) { - return 0; - } - + drwav* pWav = (drwav*)pDevice->pUserData; return (mal_uint32)drwav_read_f32(pWav, frameCount * pDevice->channels, (float*)pSamples) / pDevice->channels; }