summaryrefslogtreecommitdiffhomepage
path: root/src/raudio.c
AgeCommit message (Collapse)Author
2024-07-08Minor tweaksRay
2024-06-30REVIEWED: Formatting, follow raylib coding conventionsRay
2024-06-13[raudio] fix mapping of wave data in LoadWaveSamples() (#4062)listeria
Co-authored-by: Listeria monocytogenes <[email protected]>
2024-06-12[raudio] Add 24 bits samples support for FLAC format (#4058)Alexey Kutepov
Similarly to how it's done for WAV format, by forcing the conversion to s16 on UpdateMusicStream().
2024-05-24fix WaveCrop(): update wave->frameCount (#4003)listeria
also allow `finalFrame = wave->frameCount' as the range of frames does not include it. Co-authored-by: Listeria monocytogenes <[email protected]>
2024-05-21fix WaveCrop() and use frames instead of samples (#3994)listeria
Co-authored-by: Listeria monocytogenes <[email protected]>
2024-05-16[raudio] Removed drwav_uninit in LoadMusicStream to fix a crash (#3986)FishingHacks
2024-05-07Fixes for loading Music (#3966)veins1
* Fixes for loading Music Fix for #3889 Fixes for QOA crashes. Memory leak FIX on unsuccessful .wav loading. * Added comments
2024-04-21Review formattingRay
2024-04-20REVIEWED: Move some functions, made them staticRay
2024-04-20[raudio] Fix 3664: crash in raudio from multithreading issues (#3907)Christian Haas
* Flip release of buffer; First it needs to be taken out of the processing chain, then it can be released. The inverse of the initialization. * Add mutex locks to audio buffer functions; Separate those used from both threads * Flip release of buffer; First it needs to be taken out of the processing chain, then it can be released. The inverse of the initialization. * Remove TODO marker; The buffer is in stopped state and its data won't be accessed * Add mutex locks to music/stream functions directly operating on buffer * Secure UpdateMusicStream/PlayMusicStream/UpdateAudioStream; This change is twofold: * Add locks to UpdateMusicStream/UpdateAudioStream (second one needed separation) * Remove unnecessary hack to restart music - inlining the statements resulted in a no-op Especially the second part made it easier to ensure thread-safety overall * Remove redundant check; Already checked at beginning of function
2024-04-20Code gardeningRay
- Review formatting - Improve readability for some functions result return - Minimize early returns - Align LoadFileData() to UnloadFileData()
2024-04-14Reset music.ctxType if loading wasn't succesful (#3917)veins1
Fixes some crashes, e.g. calling StopMusicStream after trying to load Music from a non-existant .mp3 file
2024-04-02Remove trailing spacesRay
2024-02-01Fix segfault in ExportWaveAsCode (#3769)IoIxD
`char *txtData = (char *)RL_CALLOC(waveDataSize * 6 + 2000, sizeof(char));` assumes every chunk being added to txtData is 6 bytes. This is not always true, sometimes a newline is involved and the data becomes 12 bytes instead, and this can cause a random segfault. This commit changes `6` to `12`, and explains why in the comment.
2024-01-28Added missing "standalone" functions to raudio.c & fixed return bug (#3760)Alessandro Nikolaev
* Added GetFileNameWithoutExt, GetFileName & strprbrk to raudio.c * Gave return values to SaveFileData & SaveFileText in raudio.c
2024-01-22Change some minor comments to align with comments style (#3755)Idir Carlos Aliane
2024-01-05Update raudio.cRay
2024-01-02Update copyright to 2024Ray
2023-11-18Disable unused miniaudio features (#3544)Alexandre Almeida
* Disable unused miniaudio features * Fix mistakes
2023-10-31Reviewed QOA seek PRRay
2023-10-31Fix QOA seeking (#3494)veins1
2023-10-23Fixes a memory leak as a result of creating an AudioBuffer* with the old ↵Lukas
source.frameCount. This internally allocates memory to the structs data pointer which is then later overridden by the correct sound data of the source sound. (#3458) Additionally added a volume assignment from old to new as currently there is no way to get the volume of a sound and the AudioBuffer struct is not reachable from user code due to opaque definition.
2023-10-17[raudio] Implement GetMasterVolume() (#3434)Alexey Kutepov
It feels a little unfinished when you can SetMasterVolume but can't really Get it. So to finish the symmetry here is the GetMasterVolume implementation.
2023-10-13Fix `UpdateSound` parameter name (#3405)Daniil Kisel
2023-10-09Update raudio.cRay
2023-09-18Move mutex initialization before `ma_device_start()` (#3325)Le Juez Victor
2023-09-02REVIEWED: Data size type consistency between functions #3168Ray
2023-08-10Review tabs and trail-spacesRay
2023-08-09REVIEWED: Old pragma formatingRay
2023-08-04[AUDIO] Add a function to make an alias of a sound and share it's sample ↵Jeffery Myers
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
2023-05-01REVIEWED: Modules description layoutRay
2023-04-22REVIEWED: Some old TODOsRay
2023-04-15[raudio] Rewritten `ExportWaveAsCode()` file saving to be more like ↵RadsammyT
rtextures `ExportImageAsCode()` (#3013) * Update raudio.c Review `raudio.c`: rewritten `ExportWaveAsCode()` to be more like rtextures.c `ExportImageAsCode()' * no tab november accidentally inserted a tab somewhere. corrected it.
2023-04-13Make assets loading extension case insensitive #3008Ray
2023-04-09Fix warnings in raylib for MSVC (#3004)Jeffery Myers
2023-03-19Add const qualifier to char * path argument in qoaplay_open() (#2972)Webfra
* Add const qualifier to char * path argument in qoa_open() * Remove unnecessary cast
2023-03-19raudio: Fix warning on discarded const qualifier (#2967)Rob Loach
The `qoaplay_open()` function expects a `char *`, but we are passing in a `const char *`. While this works just fine, it does issue a compiler warning when strict: ``` src/raudio.c: In function ‘LoadMusicStream’: src/raudio.c:1290:45: warning: passing argument 1 of ‘qoaplay_open’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 1290 | qoaplay_desc *ctxQoa = qoaplay_open(fileName); | ^~~~~~~~ In file included from src/raudio.c:233: src/external/qoaplay.c:86:34: note: expected ‘char *’ but argument is of type ‘const char *’ 86 | qoaplay_desc *qoaplay_open(char *path) | ~~~~~~^~~~ ``` This change casts the argument to a `char *` to fix the warning.
2023-03-14Spelling (#2957)veins1
2023-03-07REVIEWED: Data types validationRay
2023-03-07WARNING: REMOVED: Multichannel audio support APIRay
2023-03-07WARNING: REMOVED: Multichannel audio support APIRay
It was quite restrictive and hacky implementation, just load multiple types same sound to play multiple instances.
2023-03-06Update raudio.cRay
2023-03-06ADDED: QOA music streaming (with auxiliar lib)Ray
Some format tweaks
2023-03-05REVIEWED: QOA audio file exportRay
2023-03-05Change default threading model for COM objectsRay
It shouldn't matter much but it could avoid some conflicts with other libraries in the future (like `tinyfiledialogs`).
2023-02-23REVIEWED: Data validationRay
2023-02-20Added mixed audio processor (#2929)hkc
* Use RL_QUADS/RL_TRIANGLES for single-pixel drawing Addresses problem mentioned in https://github.com/raysan5/raylib/issues/2744#issuecomment-1273568263 (in short: when drawing pixels using DrawPixel{,V} in camera mode, upscaled pixel becomes a line instead of bigger pixel) * [rtextures] Fixed scaling down in ImageTextEx Closes #2755 * Added global audio processor * Renamed struct member to follow naming conventions * Added example for AttachAudioMixedProcessor
2023-02-09Fixed some grammar mistakes and typos. (#2914)Julio C. Galindo
* Fixed some grammar mistakes. * Fixed some typos.
2023-02-06Update raudio.cRay