Sdl 2.0.7 prerelease!

We’re turning around a quick update to SDL, fixing audio quality and memory corruption in the audio resampler and a few other changes in SDL 2.0.7.

Please check out the PRERELEASE build here:
http://www.libsdl.org/tmp/download-2.0.php

Please report any issues or regressions in bugzilla:
http://bugzilla.libsdl.org

There will also be an update to SDL_mixer coming soon, needed with SDL 2.0.6.

In addition to the resampler improvements, here are the API changes for this release:

  • Added functions to query and set the SDL memory allocation functions:
    SDL_GetMemoryFunctions()
    SDL_SetMemoryFunctions()
    SDL_GetNumAllocations()
  • Added locking functions for multi-threaded access to the joystick and game controller APIs:
    SDL_LockJoysticks()
    SDL_UnlockJoysticks()
  • The following functions are now thread-safe:
    SDL_SetEventFilter()
    SDL_GetEventFilter()
    SDL_AddEventWatch()
    SDL_DelEventWatch()

Cheers!

1 Like

Which function should be protected by SDL_LockJoysticks()? I see that most functions call SDL_LockJoysticks() themselves.

A comment in SDL_JoystickUpdate() even says: “Make sure the list is unlocked while dispatching events to prevent application deadlocks”. So, which function should not be protected by SDL_LockJoysticks()?

I’d need to check specifics but a couple of days ago the iOS Xcode project file was broken in regard to some joystick stuff. Probably some new files not included.

This function allows you to make multiple calls to joystick info functions like SDL_JoystickNameForIndex(), SDL_JoystickGetDeviceGUID(), etc., guaranteeing that the list won’t change in between calls if a user happens to plug in or unplug a controller at just the right time.

It’s only needed if you’re pumping SDL events on a different thread than you’re calling joystick functions, so most applications shouldn’t need to worry about this.

This has been updated and, if there aren’t any showstoppers, will go live shortly:
http://www.libsdl.org/tmp/download-2.0.php

Changes:

  • Added audio stream conversion functions:
    SDL_NewAudioStream
    SDL_AudioStreamPut
    SDL_AudioStreamGet
    SDL_AudioStreamAvailable
    SDL_AudioStreamFlush
    SDL_AudioStreamClear
    SDL_FreeAudioStream

This has been release, thanks!
http://www.libsdl.org/download-2.0.php

1 Like

The link for the Windows 32bit runtime binary does not work

Once again we have a rushed release, with inadequate testing. Will the maintainers of SDL never learn? I, for one, have lost all confidence in it.

Thanks. For some reason the page was trying to serve you code for win32-x87 :slight_smile: