SDL_ClearQueuedAudio: how much data discarded?


In my application it’s important to know exactly how much data is discarded by SDL_ClearQueuedAudio() so I call SDL_GetQueuedAudioSize() immediately beforehand to find out. However there’s a potential race hazard: even if I call these functions consecutively there’s still a chance that a chunk of audio has been queued in between, so the amount of data discarded isn’t what I thought it was.

The ideal solution would be for SDL_ClearQueuedAudio() to return how much data was cleared. Currently this function is declared as void so in principle it could return a value without impairing compatibility. Is there any possibility that this change could be made, or is there any other way I can reliably discover how much data was discarded?