WARNING: BREAKING: Renamed several functions for data validation #3930

This commit is contained in:
Ray
2024-10-16 19:26:12 +02:00
parent 9b3d019502
commit 8cbf34ddc4
7 changed files with 66 additions and 50 deletions

View File

@ -892,8 +892,8 @@ Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int
return wave;
}
// Checks if wave data is ready
bool IsWaveReady(Wave wave)
// Checks if wave data is valid (data loaded and parameters)
bool IsWaveValid(Wave wave)
{
bool result = false;
@ -993,8 +993,8 @@ Sound LoadSoundAlias(Sound source)
}
// Checks if a sound is ready
bool IsSoundReady(Sound sound)
// Checks if a sound is valid (data loaded and buffers initialized)
bool IsSoundValid(Sound sound)
{
bool result = false;
@ -1726,8 +1726,8 @@ Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data,
return music;
}
// Checks if a music stream is ready
bool IsMusicReady(Music music)
// Checks if a music stream is valid (context and buffers initialized)
bool IsMusicValid(Music music)
{
return ((music.ctxData != NULL) && // Validate context loaded
(music.frameCount > 0) && // Validate audio frame count
@ -2119,8 +2119,8 @@ AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, un
return stream;
}
// Checks if an audio stream is ready
bool IsAudioStreamReady(AudioStream stream)
// Checks if an audio stream is valid (buffers initialized)
bool IsAudioStreamValid(AudioStream stream)
{
return ((stream.buffer != NULL) && // Validate stream buffer
(stream.sampleRate > 0) && // Validate sample rate is supported