summaryrefslogtreecommitdiffhomepage
path: root/src/raudio.c
diff options
context:
space:
mode:
authorJoão Coelho <[email protected]>2019-10-29 14:57:19 +0000
committerRay <[email protected]>2019-10-29 15:57:19 +0100
commit75b0264f35d8895c1e64c7c7bc85d1572d167cf2 (patch)
treed02dd8ce1f168e60c5f7e9551b9dca1101fdf51b /src/raudio.c
parent64c588e9d8e9cb34da4fe592ae091d62f59d6853 (diff)
downloadraylib-75b0264f35d8895c1e64c7c7bc85d1572d167cf2.tar.gz
raylib-75b0264f35d8895c1e64c7c7bc85d1572d167cf2.zip
fix various problems, thanks CppCheck :) (#1005)
* explained a bit more the core_window_letterbox example * fixed a few 'ups' moments that could lead to mild head pain and time loss
Diffstat (limited to 'src/raudio.c')
-rw-r--r--src/raudio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/raudio.c b/src/raudio.c
index 188c0532..f6a1e5f6 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -592,13 +592,14 @@ void SetMasterVolume(float volume)
AudioBuffer *InitAudioBuffer(ma_format format, ma_uint32 channels, ma_uint32 sampleRate, ma_uint32 bufferSizeInFrames, int usage)
{
AudioBuffer *audioBuffer = (AudioBuffer *)RL_CALLOC(1, sizeof(AudioBuffer));
- audioBuffer->buffer = RL_CALLOC(bufferSizeInFrames*channels*ma_get_bytes_per_sample(format), 1);
if (audioBuffer == NULL)
{
TraceLog(LOG_ERROR, "InitAudioBuffer() : Failed to allocate memory for audio buffer");
return NULL;
}
+
+ audioBuffer->buffer = RL_CALLOC(bufferSizeInFrames*channels*ma_get_bytes_per_sample(format), 1);
// Audio data runs through a format converter
ma_pcm_converter_config dspConfig;