* Update audio stream buffers with data */
| 83 | * Update audio stream buffers with data |
| 84 | */ |
| 85 | void Unload() { |
| 86 | if (!IsValid()) { |
| 87 | return; |
| 88 | } |
| 89 | |
| 90 | // The function signature of UnloadAutomationEventList() changes from raylib 5.0. |
| 91 | #if RAYLIB_VERSION_MAJOR == 5 |
| 92 | #if RAYLIB_VERSION_MINOR == 0 |
| 93 | ::UnloadAutomationEventList(this); |
| 94 | #elif RAYLIB_VERSION_MINOR >= 1 |
| 95 | ::UnloadAutomationEventList(*this); |
| 96 | #endif |
| 97 | #else |
| 98 | ::UnloadAutomationEventList(*this); |
| 99 | #endif |
| 100 | } |
| 101 | |
| 102 | bool IsValid() { return events != nullptr; } |
| 103 |