diff options
| author | Ray <[email protected]> | 2022-03-25 10:19:40 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-03-25 10:19:40 +0100 |
| commit | 8e28872fe14f607073d2a1c4abf1bc76b52bc343 (patch) | |
| tree | 8066783bb7a33ec4b8e7eeab3a6d86f03ed04df0 /examples/audio | |
| parent | 381236051f696f0c2818b1fff1c119302ae99b27 (diff) | |
| download | raylib-8e28872fe14f607073d2a1c4abf1bc76b52bc343.tar.gz raylib-8e28872fe14f607073d2a1c4abf1bc76b52bc343.zip | |
Rename audio callback
Diffstat (limited to 'examples/audio')
| -rw-r--r-- | examples/audio/audio_raw_stream.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/audio/audio_raw_stream.c b/examples/audio/audio_raw_stream.c index ddf4337e..9599339f 100644 --- a/examples/audio/audio_raw_stream.c +++ b/examples/audio/audio_raw_stream.c @@ -32,7 +32,8 @@ float oldFrequency = 1.0f; // Index for audio rendering float sineIdx = 0.0f; -void AudioCallback(void *buffer, unsigned int frames) +// Audio input processing callback +void AudioInputCallback(void *buffer, unsigned int frames) { audioFrequency = frequency + (audioFrequency - frequency)*0.95f; audioFrequency += 1.0f; @@ -65,7 +66,7 @@ int main(void) // Init raw audio stream (sample rate: 44100, sample size: 16bit-short, channels: 1-mono) AudioStream stream = LoadAudioStream(44100, 16, 1); - SetAudioStreamCallback(stream, &AudioCallback); + SetAudioStreamCallback(stream, AudioInputCallback); // Buffer for the single cycle waveform we are synthesizing short *data = (short *)malloc(sizeof(short)*MAX_SAMPLES); |
