[raudio][W.I.P] Separate audio devices from context, support other types other than playback - #6031
Closed
AllMeatball wants to merge 2 commits into
Closed
[raudio][W.I.P] Separate audio devices from context, support other types other than playback#6031AllMeatball wants to merge 2 commits into
AllMeatball wants to merge 2 commits into
Conversation
AllMeatball
marked this pull request as draft
July 30, 2026 01:28
Owner
|
@AllMeatball thanks but no plans to follow this route. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason
I have decided since miniaudio (what raylib uses under the hood) can use (and enumerate) separate audio devices for initialization, raylib should implement these too.
A lot of games made today have sound configuration menus for input (capture) and output (playback) devices.
This is a draft due not having all of the features I want (some might be added already) (see Feature list)
What it does
Currently it just lists out sound devices, no option for individual device setup at the moment.
Added functions, types, config options etc.
Functions
StringDuplicateGetAudioDeviceList,GetAudioDeviceListConfig Flags
SUPPORT_POSIX_STRDUP(is 1 by default and may want to be change for compat reasons)Types
rAudioDeviceIDAudioDevice,AudioDeviceList,AudioDeviceTypeNOTE: the
StringDuplicatefunction is used for copying the audio device names. if you want me to remove this or make it private to raylibs code, I am perfectly willing to do so.Feature list
Stuff to improve
I think that
rAudioDeviceIDis a bit too abstracted, a string format like "PulseAudio:hex" could be a better systemInitAudioDevicemay change into the followingbefore:
Let me know if there's anything here that I need to fix or change.