diff options
| author | Jeffery Myers <[email protected]> | 2023-08-04 07:40:10 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-04 16:40:10 +0200 |
| commit | 601cadbae6a7561d2114de891f374a2d9f2f497e (patch) | |
| tree | 4427068233222fcdcd05524623c3a9f54e2f9107 /src/raylib.h | |
| parent | d3058fe58972b80684591237c6358104f9e28ba0 (diff) | |
| download | raylib-601cadbae6a7561d2114de891f374a2d9f2f497e.tar.gz raylib-601cadbae6a7561d2114de891f374a2d9f2f497e.zip | |
[AUDIO] Add a function to make an alias of a sound and share it's sample data (#3219)
* Add a function to clone a sound and share data with another sound.
* rename items based on feedback
* PR Feedback, use custom unload for sound alias, not variant of normal sound unloading
Diffstat (limited to 'src/raylib.h')
| -rw-r--r-- | src/raylib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h index 8b5a8070..a49e19a5 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1533,10 +1533,12 @@ RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileDat RLAPI bool IsWaveReady(Wave wave); // Checks if wave data is ready RLAPI Sound LoadSound(const char *fileName); // Load sound from file 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 IsSoundReady(Sound sound); // Checks if a sound is ready RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data 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) RLAPI bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success RLAPI bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success |
