REVIEWED: Comments for UpdateSound() specifying expected data format #5350

This commit is contained in:
Ray 2025-11-30 19:02:38 +01:00
parent a568506265
commit 4724f7cf1b
2 changed files with 3 additions and 3 deletions

View File

@ -1040,8 +1040,8 @@ void UnloadSoundAlias(Sound alias)
} }
// Update sound buffer with new data // Update sound buffer with new data
// NOTE 1: data format must match sound.stream.sampleSize // PARAMS: [data], format must match sound.stream.sampleSize, default 32 bit float - stereo
// NOTE 2: frameCount must not exceed sound.frameCount // PARAMS: [frameCount] must not exceed sound.frameCount
void UpdateSound(Sound sound, const void *data, int frameCount) void UpdateSound(Sound sound, const void *data, int frameCount)
{ {
if (sound.stream.buffer != NULL) if (sound.stream.buffer != NULL)

View File

@ -1657,7 +1657,7 @@ RLAPI Sound LoadSound(const char *fileName); // Load so
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized) RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data (data and frame count should fit in sound) RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data (default data format: 32 bit float, stereo)
RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadWave(Wave wave); // Unload wave data
RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void UnloadSound(Sound sound); // Unload sound
RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data) RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)