Weird callback paramater len

greetings,
i’m trying to use the sdl audio stuff.

SDL_AudioSpec wanted_spec;
wanted_spec.freq = avfile.sampleRate(); ///sdl can resample itself
wanted_spec.format = AUDIO_S16SYS;
wanted_spec.channels = 2;
wanted_spec.samples = 1024;
wanted_spec.callback = AudioCallback;
wanted_spec.userdata =  &avfile;

/// Open the audio device.
Q_ASSERT( SDL_OpenAudio(&wanted_spec, NULL) >= 0 );

i expected the samples being consumed by one callback to be 1024 or 2048
depending on the context.

though i get calls asking for e.g. 1880 samples
it is imposible to do double buffering when the amount of samples per callback
is not known.
is there something i miss, maybe a flag?–

Arvid Picciani
@Arvid_Picciani
cross platform open source software developer and activist
exys.org libqxt.sf.net freedroid.org

Please do not send me MS Office attachments,
Microsoft does not allowe me to read them, as i do not agree the EULA.