The parameter is incorrect

Hello,

When I’m using SDL_mixer, I always get this message when I close my app :

avcore\audiocore\client\audioclient\audioclientcore.cpp(1856)\AUDIOSES.DLL!00007FF8F15F7EF4: (caller: 0000000066135B99) ReturnHr(1) tid(4368) 80070057 The parameter is incorrect.

I’m using this code to open the audio :
Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 22050

Someone know how to fix this?

P.S. I’m on Windows 10, using Visual Studio 2019

Thanks,

Maybe 22050 is too big for the chuck size but I still get this error with 256 or 512. Can it be my audio drivers or something not related to SDL_mixer ? I’m I the only one to get this error?

1 Like

I observe the same trace, and I notice this happens while calling Mix_CloseAudio.

It has something to do with the drivers used by SDL, I think.

For instance, specifying the folowing environment variable, in my case, makes the message disappearing:
SDL_AUDIODRIVER=directsound

Someone is reporting the same trace here