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

Sound_NewSample*'s desired field should be a const pointer. #65

Open
icculus opened this issue May 4, 2022 · 0 comments
Open

Sound_NewSample*'s desired field should be a const pointer. #65

icculus opened this issue May 4, 2022 · 0 comments
Assignees

Comments

@icculus
Copy link
Owner

icculus commented May 4, 2022

Right now it looks like this:

SNDDECLSPEC Sound_Sample * SDLCALL Sound_NewSample(SDL_RWops *rw,
                                                   const char *ext,
                                                   Sound_AudioInfo *desired,
                                                   Uint32 bufferSize);

...but that desired argument isn't modified (the desired and obtained values are both available in the returned Sound_Sample, not set in the desired struct), so this should be const.

I have to double-check this is actually true, but this is likely a mistake from the year 2000. :)

@icculus icculus self-assigned this May 4, 2022
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

1 participant