REVIEWED: Data types validation
This commit is contained in:
parent
15716e59dc
commit
ab1e246367
4 changed files with 25 additions and 9 deletions
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue