summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2024-01-05 22:33:02 +0100
committerRay <[email protected]>2024-01-05 22:33:02 +0100
commitc95b71d40d34354fec3998a4e2dc54b3c291cedc (patch)
tree14ba514641c7343babd22abcec6e78998d785c29 /src
parent3afb4dda9773b136283c567ecef4a78d53bc4e85 (diff)
downloadraylib-c95b71d40d34354fec3998a4e2dc54b3c291cedc.tar.gz
raylib-c95b71d40d34354fec3998a4e2dc54b3c291cedc.zip
Update raudio.c
Diffstat (limited to 'src')
-rw-r--r--src/raudio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/raudio.c b/src/raudio.c
index 7269760e..43024210 100644
--- a/src/raudio.c
+++ b/src/raudio.c
@@ -939,12 +939,14 @@ Sound LoadSoundAlias(Sound source)
if (source.stream.buffer->data != NULL)
{
- AudioBuffer* audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, 0, AUDIO_BUFFER_USAGE_STATIC);
+ AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, 0, AUDIO_BUFFER_USAGE_STATIC);
+
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
- return sound; // early return to avoid dereferencing the audioBuffer null pointer
+ return sound; // Early return to avoid dereferencing the audioBuffer null pointer
}
+
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
audioBuffer->volume = source.stream.buffer->volume;
audioBuffer->data = source.stream.buffer->data;