"unexpected behaviour" in Mix_OpenAudio

Hi list!

I am having problems with doom-legacy for SDL. The music plays nicely
but the sfx are playing much too fast/high-pitched: sampling rate
When I looked into the source to find the cause of it, I found something
that might introduce the error but at least hides bugs in SDL-using

in Mix_OpenAudio:-----------------------------
/* Open the mixer with a certain desired audio format */
int Mix_OpenAudio(int frequency, Uint16 format, int nchannels, int
int i;
SDL_AudioSpec desired;

    /* If the mixer is already opened, increment open count */
    if ( audio_opened ) {


if a Mixer has already been opened with paramter set A and I try to open
another one with parameter set B, Mix_OpenAudio will happily say “you
already opened audio with parameter set B, go ahead”, which is wrong.

Regards, Andreas