3333*
3434* OPTIONAL DEPENDENCIES (included):
3535* [rcore] msf_gif (Miles Fogle) for GIF recording
36- * [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorythm
37- * [rcore] sdefl (Micha Mettke) for DEFLATE compression algorythm
36+ * [rcore] sinfl (Micha Mettke) for DEFLATE decompression algorithm
37+ * [rcore] sdefl (Micha Mettke) for DEFLATE compression algorithm
3838* [rtextures] stb_image (Sean Barret) for images loading (BMP, TGA, PNG, JPEG, HDR...)
3939* [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
4040* [rtextures] stb_image_resize (Sean Barret) for image resizing algorithms
@@ -210,7 +210,7 @@ typedef struct Mesh {
210210 // Vertex attributes data
211211 float *vertices; // Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
212212 float *texcoords; // Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
213- float *texcoords2; // Vertex second texture coordinates (useful for lightmaps ) (shader-location = 5)
213+ float *texcoords2; // Vertex texture second coordinates (UV - 2 components per vertex ) (shader-location = 5)
214214 float *normals; // Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
215215 float *tangents; // Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
216216 unsigned char *colors; // Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
@@ -297,10 +297,14 @@ typedef struct Wave {
297297 unsigned int channels; // Number of channels (1-mono, 2-stereo, ...)
298298 void *data; // Buffer data pointer
299299} Wave;
300+ // Opaque structs declaration
301+ // NOTE: Actual structs are defined internally in raudio module
300302typedef struct rAudioBuffer rAudioBuffer;
303+ typedef struct rAudioProcessor rAudioProcessor;
301304// AudioStream, custom audio stream
302305typedef struct AudioStream {
303306 rAudioBuffer *buffer; // Pointer to internal data used by the audio system
307+ rAudioProcessor *processor; // Pointer to internal data processor, useful for audio effects
304308 unsigned int sampleRate; // Frequency (samples per second)
305309 unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
306310 unsigned int channels; // Number of channels (1-mono, 2-stereo, ...)
@@ -771,6 +775,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
771775 const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
772776 void SetClipboardText(const char *text); // Set clipboard text content
773777 const char *GetClipboardText(void); // Get clipboard text content
778+ void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
779+ void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
774780// Custom frame control functions
775781// NOTE: Those functions are intended for advance users that want full control over the frame processing
776782// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
@@ -851,6 +857,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
851857 unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
852858 void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
853859 bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
860+ bool ExportDataAsCode(const char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
854861 char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
855862 void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
856863 bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
@@ -865,18 +872,18 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
865872 const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
866873 const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
867874 const char *GetApplicationDirectory(void); // Get the directory if the running application (uses static string)
868- char **GetDirectoryFiles(const char *dirPath, int *count); // Get filenames in a directory path (memory should be freed)
875+ char **GetDirectoryFiles(const char *dirPath, int *count); // Get filenames in a directory path (memory must be freed)
869876 void ClearDirectoryFiles(void); // Clear directory files paths buffers (free memory)
870877 bool ChangeDirectory(const char *dir); // Change working directory, return true on success
871878 bool IsFileDropped(void); // Check if a file has been dropped into window
872- char **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
879+ char **GetDroppedFiles(int *count); // Get dropped files names (memory must be freed)
873880 void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
874881 long GetFileModTime(const char *fileName); // Get file modification time (last write time)
875882// Compression/Encoding functionality
876- unsigned char *CompressData(const unsigned char *data, int dataLength , int *compDataLength ); // Compress data (DEFLATE algorithm)
877- unsigned char *DecompressData(const unsigned char *compData, int compDataLength , int *dataLength ); // Decompress data (DEFLATE algorithm)
878- char *EncodeDataBase64(const unsigned char *data, int dataLength , int *outputLength ); // Encode data to Base64 string
879- unsigned char *DecodeDataBase64(const unsigned char *data, int *outputLength ); // Decode Base64 string data
883+ unsigned char *CompressData(const unsigned char *data, int dataSize , int *compDataSize ); // Compress data (DEFLATE algorithm), memory must be MemFree( )
884+ unsigned char *DecompressData(const unsigned char *compData, int compDataSize , int *dataSize ); // Decompress data (DEFLATE algorithm), memory must be MemFree( )
885+ char *EncodeDataBase64(const unsigned char *data, int dataSize , int *outputSize ); // Encode data to Base64 string, memory must be MemFree()
886+ unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize ); // Decode Base64 string data, memory must be MemFree()
880887// Persistent storage management
881888 bool SaveStorageValue(unsigned int position, int value); // Save integer value to storage file (to defined position), returns true on success
882889 int LoadStorageValue(unsigned int position); // Load integer value from storage file (from defined position)
@@ -1240,13 +1247,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
12401247 bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius); // Check collision between box and sphere
12411248 RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius); // Get collision info between ray and sphere
12421249 RayCollision GetRayCollisionBox(Ray ray, BoundingBox box); // Get collision info between ray and box
1243- RayCollision GetRayCollisionModel(Ray ray, Model model); // Get collision info between ray and model
12441250 RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform); // Get collision info between ray and mesh
12451251 RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle
12461252 RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4); // Get collision info between ray and quad
12471253//------------------------------------------------------------------------------------
12481254// Audio Loading and Playing Functions (Module: audio)
12491255//------------------------------------------------------------------------------------
1256+ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
12501257// Audio device management functions
12511258 void InitAudioDevice(void); // Initialize audio device and context
12521259 void CloseAudioDevice(void); // Close the audio device and context
@@ -1308,4 +1315,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
13081315 void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
13091316 void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
13101317 void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
1311- void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
1318+ void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
1319+ void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
1320+ void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor);
1321+ void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor);
0 commit comments