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

Implement Miniaudio for sound and music processing/mixing/playback #828

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

dashodanger
Copy link
Member

@dashodanger dashodanger commented Jan 11, 2025

This an initial implementation of Miniaudio for handling our various audio-related needs. It offers the following advantages over our current built-in mixing implementation:

1- Does not require managing device lock/unlocks from the main thread
2- Can accommodate new platforms/libraries without requiring a significant rework (for instance, can be used with SDL or sokol_app or what have you; custom backends can even be written if necessary although it supports the platforms we already target natively)
3 - True 3D spatialization of sounds
4 - Node system will not require allocating additional memory for mixed versions of underwater/vacuum/reverb effects or preprocessing the sound with effects added before playback
5 - More flexible regarding disparity of sound formats, channel counts, etc, and the underlying device's properties
6 - Simplified Sound Menu for the end user
7 - Custom decoders can be written to expand the audio types supported, although this PR implements support for all of the formats that we already supported, with the following exceptions:

  • RAD v2 module support has been removed. The player code did not mesh well with the 'decoder' concept
  • OPL and Emu de MIDI playback of MIDI tracks have been removed to simplify the MIDI 'decoder' implementation
    • IMF support, which relies on OPL support, is still in and is contained in its own source/decoder implementation

@pbdot
Copy link
Collaborator

pbdot commented Jan 11, 2025

Awesome, so many wins, not needing to lock the main thread, and the consistency on the audio format code is really nice. I looked it over, all looks good 👍

@dashodanger dashodanger merged commit ab56909 into master Jan 11, 2025
5 checks passed
@dashodanger dashodanger deleted the miniaudio-implementation branch January 11, 2025 21:32
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.

2 participants