mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
REVIEWED: Data types validation
This commit is contained in:
10
src/raudio.c
10
src/raudio.c
@ -912,11 +912,11 @@ Sound LoadSoundFromWave(Wave wave)
|
||||
// Checks if a sound is ready
|
||||
bool IsSoundReady(Sound sound)
|
||||
{
|
||||
return ((sound.frameCount > 0) && // Validate frame count
|
||||
(sound.stream.buffer != NULL) && // Validate stream buffer
|
||||
(sound.stream.sampleRate > 0) && // Validate sample rate is supported
|
||||
(sound.stream.sampleSize > 0) && // Validate sample size is supported
|
||||
(sound.stream.channels > 0)); // Validate number of channels supported
|
||||
return ((sound.frameCount > 0) && // Validate frame count
|
||||
(sound.stream.buffer != NULL) && // Validate stream buffer
|
||||
(sound.stream.sampleRate > 0) && // Validate sample rate is supported
|
||||
(sound.stream.sampleSize > 0) && // Validate sample size is supported
|
||||
(sound.stream.channels > 0)); // Validate number of channels supported
|
||||
}
|
||||
|
||||
// Unload wave data
|
||||
|
||||
Reference in New Issue
Block a user