Browse Source

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

pull/5320/merge
Ray 3 days ago
parent
commit
4724f7cf1b
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      src/raudio.c
  2. +1
    -1
      src/raylib.h

+ 2
- 2
src/raudio.c View File

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

+ 1
- 1
src/raylib.h 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 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 void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data (n">data and frame count should fit in sound)
RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data (k">default data format: 32 bit float, stereo)
RLAPI void UnloadWave(Wave wave); // Unload wave data
RLAPI void UnloadSound(Sound sound); // Unload sound
RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)

Loading…
Cancel
Save