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

Refer to OpenAL constants instead of instance variables. #2686

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

player-03
Copy link
Contributor

Most likely, the intent was to allow users to override these values, but there isn't a clear use case for doing so. Audio libraries besides OpenAL might use other constants, but in that case #if lime_openal would fail and this code wouldn't even run.

If this is merged, we could then clean up the 74 variables from OpenALAudioContext. (This is only a fraction of the constants listed in AL, and I'm not sure why those 74 were picked. They aren't even all used.)

Speaking of, I also don't think **OpenAL**AudioContext would function correctly if the backend library isn't OpenAL. I guess we could rename it to just AudioContext and then add some backend-switching code... Oh wait, we already have lime.media.AudioContext.

Is there a use case I'm missing here? It just seems pointlessly risky to be using variables.

Most likely, the intent was to allow users to override these values, but there isn't a clear use case for doing so. Audio libraries besides OpenAL might use other constants, but in that case `#if lime_openal` would fail and this code wouldn't even run.
@SomeGuyWhoLovesCoding
Copy link

Looks good! It's pretty much ready to merge now.

@SomeGuyWhoLovesCoding
Copy link

Looks good! It's pretty much ready to merge now.

Also you're not missing anything

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.

None yet

2 participants