There could be some cases where we need to define the internal audio buffer size, now it's possible.
RENAMED: InitAudioBuffer() to LoadAudioBuffer()
RENAMED: CloseAudioBuffer() to UnloadAudioBuffer()
Renamed some defines and reviewed some comments.
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions:
- stdlib.h: primary dependency is for malloc() and free()
- stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI?
- string.h: just around 8 functions required
- math.h: just around 8 functions required
- others: 1-2 functions required for some other headers
* Update to miniaudio 0.10
This replaces the old ma_pcm_converter with ma_data_converter.
At this time of this commit, miniaudio 0.10 is still in the testing
phase. To make it easier to update miniaudio.h during this period, I've
temporarily moved the @raysan5 Win32 customizations to raudio.c because
there may be quite a few updates to miniaudio.h during this time.
* Use miniaudio's built-in volume control.
Short non-looping sounds can sometimes think they need to keep playing and will output their first few frames again. This helps to break out of all the loops instead of just this one.
...moved to internal AudioBuffer structure as totalFramesProcessed, now time measure works again... but there is some problem with looping...
Also note some inconsistencies between frames and samples, it seems those concepts are not considered correctly in the code.
This module has been completely reviewed, old structures still contained OpenAL useless data, a full module revision. Some of the changes:
- Redesigned internal MusicData structure
- Exposed MusicStream structure data
- Reviewed AudioStream structure
- Redesigned Sound structure
Still some work to do...
* added multi channel sound replay to raudio
added -fPIC to Makefile for Linux
added simple lighting and audio multi channel to examples Makefile
* not properly reporting audio buffer pool size...
Users can define their custom memory management macros.
NOTE: Most external libraries support custom macros in the same way, raylib should redefine those macros to raylib ones, to unify custom memory loading. That redefinition is only implemented as example for stb_image.h in [textures] module.