# Sdl 2.0.7 released!

**URL:** <https://discourse.libsdl.org/t/sdl-2-0-7-released/23279>\
**Category:** SDL Announcements\
**Created:** [October 23, 2017, 7:35pm UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279 "2017-10-23T19:35:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 23, 2017, 7:35pm UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279/1 "2017-10-23T19:35:03Z")

</div>

Thanks to all the people who contributed code and feedback, SDL 2.0.7 is  
now available!  
[http://www.libsdl.org/download-2.0.php](http://www.libsdl.org/download-2.0.php)

In addition to audio resampling improvements and fixed D-BUS support, here are the major changes in this release:

- Added audio stream conversion functions:  
SDL\_NewAudioStream  
SDL\_AudioStreamPut  
SDL\_AudioStreamGet  
SDL\_AudioStreamAvailable  
SDL\_AudioStreamFlush  
SDL\_AudioStreamClear  
SDL\_FreeAudioStream
- 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()

Enjoy!

---

<div class="post-metadata">

**Author:** ![goobliata](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/goobliata/32/3126_2.png) [@goobliata](https://discourse.libsdl.org/u/goobliata)\
**Post date:** [October 25, 2017, 7:19pm UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279/2 "2017-10-25T19:19:03Z")

</div>

There’s still tonnes of noise in audio like 2.0.6. Now it’s on every driver not just wasapi, and it’s there even if I set the frequency to the same as the hardware. Only tried Windows thus far.

---

<div class="post-metadata">

**Author:** ![Eric\_Wasylishen](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/e/ce73a5/32.png) [@Eric\_Wasylishen](https://discourse.libsdl.org/u/Eric_Wasylishen)\
**Post date:** [October 25, 2017, 9:40pm UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279/3 "2017-10-25T21:40:05Z")

</div>

Just as one data point, I’m not hearing any noise with:

- Windows 10, default format (in the audio device properties) set to 24 bit / 48kHz.
- application is requesting 16-bit, 44.1kHz from SDL. SDL is using the WASAPI backend.

The application is quakespasm and we’re providing audio data via the thread callback method, and not using SDL\_mixer or SDL\_AudioCVT.

What formats are your OS and SDL app using? Using SDL\_mixer?

---

<div class="post-metadata">

**Author:** ![goobliata](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/goobliata/32/3126_2.png) [@goobliata](https://discourse.libsdl.org/u/goobliata)\
**Post date:** [October 26, 2017, 5:17am UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279/4 "2017-10-26T05:17:09Z")

</div>

I think the key difference is the type of sound you’re listening to. I’m using sine waves and pulse waves so noise is much more noticeable than a sample which is already all over the place. I’m on Windows 10 and have tried 44100, 48000 and 192000 Hz at 16 bits on all the backends. I haven’t tried 24 bits. I’m also using the thread callback method and not using SDL\_mixer or anything else. I’ll try to take a closer look at it or at least make a small demo application which shows the problem in the near future.

---

<div class="post-metadata">

**Author:** ![goobliata](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/goobliata/32/3126_2.png) [@goobliata](https://discourse.libsdl.org/u/goobliata)\
**Post date:** [November 8, 2017, 4:42pm UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279/5 "2017-11-08T16:42:11Z")

</div>

Hmmm, I get a lot of noise/bad feedback if I use stereo audio in 2.0.5 as well (which works with mono.) Not sure what’s going on. I’m just doubling up the same samples for L and R. If I don’t specify SDL\_AUDIO\_ALLOW\_FORMAT\_CHANGE with 2.0.7 and use mono, it sounds quite a bit better but not perfect.

---

<div class="post-metadata">

**Author:** ![goobliata](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/goobliata/32/3126_2.png) [@goobliata](https://discourse.libsdl.org/u/goobliata)\
**Post date:** [November 23, 2017, 2:11pm UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279/6 "2017-11-23T14:11:29Z")

</div>

Update: the problem with stereo audio was my fault. But I went through SDL hg history and tracked the noise down to the WASAPI driver. Then I found my code to force directsound had stopped working (had moved SDL\_Init before it!) So yeah, the WASAPI driver is very noisy on my 2 Windows computers.

---

<div class="post-metadata">

**Author:** ![goobliata](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/goobliata/32/3126_2.png) [@goobliata](https://discourse.libsdl.org/u/goobliata)\
**Post date:** [November 23, 2017, 2:30pm UTC](https://discourse.libsdl.org/t/sdl-2-0-7-released/23279/7 "2017-11-23T14:30:40Z")

</div>

One last thing, may have found a small bug but not sure… judging by the comment and a cursory look this should be an or in src/audio/SDL\_audiocvt.c:

```
@@ -1533,7 +1534,7 @@
         /* If we don't have a staging buffer or we're given enough data that
            we don't need to store it for later, skip the staging process.
          */
- if (!stream->staging_buffer_filled && len >= stream->staging_buffer_size) {
+ if (!stream->staging_buffer_filled || len >= stream->staging_buffer_size) {
             return SDL_AudioStreamPutInternal(stream, buf, len, NULL);
         }
```
