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

Audio Feature request: SDL_SetAudioStreamGainChannelMap, SDL_GetAudioStreamGainChannelMap #10887

Open
luppichristian opened this issue Sep 17, 2024 · 3 comments
Assignees
Milestone

Comments

@luppichristian
Copy link

luppichristian commented Sep 17, 2024

Right now the Audio API provides SDL_GetAudioStreamGain() and SDL_SetAudioStreamGain() that modify the gain of an audio stream.

It would be useful to implement SDL_SetAudioStreamGainChannelMap(), SDL_GetAudioStreamGainChannelMap() to specifically set the gain of a channel.

This allows the user to implement for example audio panning where the gain must be set dynamically and is often changed depending by the position of the sound in a custom world.

Instead of "Gain Channel Map" perhaps a better name would be "Panning Channel Map"

@slouken slouken added this to the 3.2.0 milestone Sep 17, 2024
@icculus
Copy link
Collaborator

icculus commented Sep 17, 2024

I dunno, this feels feature-creepy to me.

@flibitijibibo
Copy link
Collaborator

This does start to get into the matrix coefficients territory, yeah - for something like this FAudio might work better:

https://github.com/FNA-XNA/FAudio

@luppichristian
Copy link
Author

Now that I think about a matrix would offer much more control.
I think that implementing some sort of channel map or matrix would be a necessary feature for a good audio system.
I get that SDL does not try to be a complete audio system but i think that it should provide at least one API to allow the user to dynamically modify the samples of an audio stream.

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

No branches or pull requests

4 participants