diff options
| author | ptarabbia <[email protected]> | 2022-05-12 09:26:36 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-12 15:26:36 +0200 |
| commit | ea598f7d7722a725fb73069bc11eab6c2e2b93a5 (patch) | |
| tree | 8aa84e5965919793e6ca81a3b4bb9b3b54ae6f29 /examples | |
| parent | c0275df820300d3d117abecc1b3ead375aaef99d (diff) | |
| download | raylib-ea598f7d7722a725fb73069bc11eab6c2e2b93a5.tar.gz raylib-ea598f7d7722a725fb73069bc11eab6c2e2b93a5.zip | |
Fix crash with delay demo. (#2472)
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/audio/audio_music_stream.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/audio/audio_music_stream.c b/examples/audio/audio_music_stream.c index 14350336..37d3bde2 100644 --- a/examples/audio/audio_music_stream.c +++ b/examples/audio/audio_music_stream.c @@ -68,15 +68,16 @@ int main(void) Music music = LoadMusicStream("resources/country.mp3"); // Allocate buffer for the delay effect - delayBuffer = (float *)RL_CALLOC(48000*2, sizeof(float)); // 1 second delay (device sampleRate*channels) + delayBufferSize = 48000 * 2; + delayBuffer = (float *)RL_CALLOC(delayBufferSize, sizeof(float)); // 1 second delay (device sampleRate*channels) PlayMusicStream(music); float timePlayed = 0.0f; bool pause = false; - bool hasFilter = false; - bool hasDelay = false; + bool hasFilter = true; + bool hasDelay = true; SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- |
