The tutorials showed this way,
SDL_AudioSpec wanted_spec, spec;
wanted_spec.freq = aCodecCtx->sample_rate;
wanted_spec.format = AUDIO_S16SYS;
wanted_spec.channels = aCodecCtx->channels;
wanted_spec.silence = 0;
wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE;
wanted_spec.callback = audio_callback;
wanted_spec.userdata = aCodecCtx;
SDL_OpenAudio(&wanted_spec, &spec);
It doesn't work, apparently the samples are floating points and sdl audio spec format is 16 bit samples. How to make SDL work with floating point samples?