Fix crash with delay demo. (#2472)
This commit is contained in:
parent
c0275df820
commit
ea598f7d77
1 changed files with 4 additions and 3 deletions
|
@ -68,15 +68,16 @@ int main(void)
|
||||||
Music music = LoadMusicStream("resources/country.mp3");
|
Music music = LoadMusicStream("resources/country.mp3");
|
||||||
|
|
||||||
// Allocate buffer for the delay effect
|
// 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);
|
PlayMusicStream(music);
|
||||||
|
|
||||||
float timePlayed = 0.0f;
|
float timePlayed = 0.0f;
|
||||||
bool pause = false;
|
bool pause = false;
|
||||||
|
|
||||||
bool hasFilter = false;
|
bool hasFilter = true;
|
||||||
bool hasDelay = false;
|
bool hasDelay = true;
|
||||||
|
|
||||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue