I’m experiencing a couple of minor problems with the Win32 version of
SDL, which I’ve only managed to work-cure by swapping the
initialisation order.
When put last, the sound would always give a couple of clicks after
calling SDL_OpenAudio, but when it’s just about the first thing I do
there’s no problem. I tried with an empty sound callback and filling
any requests with fixed silence, but it made no difference. Only
increasing the sample buffer size to 4096 seemed to cure it, but
that’s far too big for what I need!
Another problem is that the function keys don’t work when my
application is first started (most other keys seem fine). If I
Alt-tab away, then back to it, they work fine. I have had this
working in the past, but swapping things round to cure the sound seems
to have broken this!
I realise the underlying DirectSound implementation will use a window
handle (the main window?), so that may be sensitive to order, but I’m
not sure about other platforms and sub-systems complications.
So, is there a recommended order for setting up the various SDL
sub-systems, which is best for all platforms? Should I initialise all
at once with SDL_Init and let it worry about it?
Best regards,
Si
Si—
Note: My e-mail address is intentionally invalid to foil spammers. Change ‘nospam’ to ‘si’ for my real e-mail address.