mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
WARNING: BREAKING: Renamed several functions for data validation #3930
This commit is contained in:
16
src/raudio.c
16
src/raudio.c
@ -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
|
||||
|
||||
Reference in New Issue
Block a user