SDL_PauseAudioDevice - bug or intended behavior?

I’ve noticed that SDL_PauseAudioDevice does not lock the audio device.
This means that although it is safe to allocate a mixing buffer after
opening an audio device but before unpausing the device, it is not safe
to deallocate the mixing buffer after pausing the device but before
closing it. This seems weirdly asymmetrical. Is this intended behavior
(and therefore deserving of a warning in the wiki) or is it a bug?

device = SDL_OpenAudioDevice(…);
allocate_mixing_buffer(); // Safe.
SDL_PauseAudioDevice(device, 0);
// …
SDL_PauseAudioDevice(device, 1);
// At this point the audio callback may still be running.
deallocate_mixing_buffer(); // Not safe.
SDL_CloseAudioDevice(device);–
Rainer Deyke (rainerd at eldwood.com)

SDL_PauseAudioDevice(device, 1);
// At this point the audio callback may still be running.
deallocate_mixing_buffer(); // Not safe.
SDL_CloseAudioDevice(device);

This is fixed now, hg changeset 6860de5bcb8c.

Thanks!

–ryan.