mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-03 20:59:18 -05:00
Updated raylib data structures (markdown)
@ -49,9 +49,9 @@ Those structures are quite common in most of the engines out there.
|
|||||||
|
|
||||||
// Audio related data
|
// Audio related data
|
||||||
struct Wave; [20 bytes] [+4 bytes] // Wave data pointer (RAM) and data parameters
|
struct Wave; [20 bytes] [+4 bytes] // Wave data pointer (RAM) and data parameters
|
||||||
struct AudioStream; [12 bytes] [+4 bytes] // Audio buffer pointer (private) and parameters
|
struct AudioStream; [16 bytes] [+8 bytes] // Audio buffer pointer (private) and parameters
|
||||||
struct Sound; [16 bytes] [+8 bytes] // Audio stream and samples count
|
struct Sound; [20 bytes] [+12 bytes] // Audio stream and samples count
|
||||||
struct Music; [18 bytes] [+12 bytes] // Audio stream and music data pointer for streaming
|
struct Music; [32 bytes] [+16 bytes] // Audio stream and music data pointer for streaming
|
||||||
```
|
```
|
||||||
|
|
||||||
raylib abuses the data pass-by-value on most of its functions, actually, only around 10% of the functions require dealing with data pointers. For this reason, I tried to keep data structures as small as possible, usually under 64 bytes size, and use internal pointers when data requires modification by some function (usually Load/Update/Unload functions).
|
raylib abuses the data pass-by-value on most of its functions, actually, only around 10% of the functions require dealing with data pointers. For this reason, I tried to keep data structures as small as possible, usually under 64 bytes size, and use internal pointers when data requires modification by some function (usually Load/Update/Unload functions).
|
||||||
|
|||||||
Reference in New Issue
Block a user