SDL_sound icon indicating copy to clipboard operation
SDL_sound copied to clipboard

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

Open icculus opened this issue 3 years ago • 0 comments

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 avatar May 04 '22 17:05 icculus