From 178017db2b4cbfb4e41868945c2c7f46fda5b94d Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Sun, 5 Jun 2022 13:13:40 +0200 Subject: [PATCH] Ensure memory is cleared to make compiler happy --- libraries/audio/src/Sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/audio/src/Sound.cpp b/libraries/audio/src/Sound.cpp index 7c5dd3813b..385ebf6672 100644 --- a/libraries/audio/src/Sound.cpp +++ b/libraries/audio/src/Sound.cpp @@ -44,7 +44,7 @@ AudioDataPointer AudioData::make(uint32_t numSamples, uint32_t numChannels, const size_t memorySize = sizeof(AudioData) + bufferSize; // Allocate the memory for the audio data object and the buffer - void* memory = ::malloc(memorySize); + void* memory = ::calloc(1, memorySize); auto audioData = reinterpret_cast(memory); auto buffer = reinterpret_cast(audioData + 1); assert(((char*)buffer - (char*)audioData) == sizeof(AudioData));