From 39c4dcfed46b2602dad71368ad734409d7f2cd96 Mon Sep 17 00:00:00 2001 From: riadbettole <118698087+riadbettole@users.noreply.github.com> Date: Sun, 10 Dec 2023 21:38:33 +0100 Subject: [PATCH] Update audio_raw_stream.c AudioInputCallBack has this audioFrequency += 1.0f; audioFrequency -= 1.0f; cancels out each others --- examples/audio/audio_raw_stream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/audio/audio_raw_stream.c b/examples/audio/audio_raw_stream.c index 6befa765a..b3173ab97 100644 --- a/examples/audio/audio_raw_stream.c +++ b/examples/audio/audio_raw_stream.c @@ -38,8 +38,7 @@ float sineIdx = 0.0f; void AudioInputCallback(void *buffer, unsigned int frames) { audioFrequency = frequency + (audioFrequency - frequency)*0.95f; - audioFrequency += 1.0f; - audioFrequency -= 1.0f; + float incr = audioFrequency/44100.0f; short *d = (short *)buffer;