Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and improve audio system #77

Merged
merged 1 commit into from
Sep 14, 2024
Merged

Refactor and improve audio system #77

merged 1 commit into from
Sep 14, 2024

Conversation

dogo
Copy link
Owner

@dogo dogo commented Sep 14, 2024

  • Fix potential uninitialized variable issue in oslDecodeWav by initializing streambuffer to NULL and checking before freeing it.
  • Add null checks and improve error handling in oslAudioCallback_PlaySound_WAV, oslAudioCallback_AudioCallback_WAV, oslAudioCallback_ReactiveSound_WAV, and oslAudioCallback_StandBy_WAV.
  • Improve oslAudioCallback_DeleteSound_WAV with added null safety and proper memory management.
  • Refactor oslLoadSoundFileWAV for better error handling, memory safety, and readability, including consolidated error handling and memory deallocation in case of failure.

- Fix potential uninitialized variable issue in `oslDecodeWav` by initializing `streambuffer` to NULL and checking before freeing it.
- Add null checks and improve error handling in `oslAudioCallback_PlaySound_WAV`, `oslAudioCallback_AudioCallback_WAV`, `oslAudioCallback_ReactiveSound_WAV`, and `oslAudioCallback_StandBy_WAV`.
- Improve `oslAudioCallback_DeleteSound_WAV` with added null safety and proper memory management.
- Refactor `oslLoadSoundFileWAV` for better error handling, memory safety, and readability, including consolidated error handling and memory deallocation in case of failure.
@dogo dogo merged commit e734857 into master Sep 14, 2024
6 checks passed
@dogo dogo deleted the refactor/audio branch September 14, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant