Skip to content

Commit aa4f916

Browse files
committed
Renamed SDL_PROP_AUDIOSTREAM_KEEP_ON_SHUTDOWN_BOOLEAN to SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN
1 parent 6cfe211 commit aa4f916

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

include/SDL3/SDL_audio.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,11 +1067,7 @@ extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_CreateAudioStream(const SDL_Au
10671067
* The application can hang any data it wants here, but the following
10681068
* properties are understood by SDL:
10691069
*
1070-
* - `SDL_PROP_AUDIOSTREAM_KEEP_ON_SHUTDOWN_BOOLEAN`: if true, the stream will
1071-
* not be automatically destroyed during SDL_Quit(). This property is
1072-
* ignored for streams created through SDL_OpenAudioDeviceStream(). Streams
1073-
* bound to devices that aren't destroyed will still be unbound. Default
1074-
* false. (since SDL 3.4.0)
1070+
* - `SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN`: if true (the default), the stream be automatically cleaned up when the audio subsystem quits. If set to false, the streams will persist beyond that. This property is ignored for streams created through SDL_OpenAudioDeviceStream(), and will always be cleaned up. Streams that are not cleaned up will still be unbound from devices when the audio subsystem quits. This property was added in SDL 3.4.0.
10751071
*
10761072
* \param stream the SDL_AudioStream to query.
10771073
* \returns a valid property ID on success or 0 on failure; call
@@ -1083,7 +1079,7 @@ extern SDL_DECLSPEC SDL_AudioStream * SDLCALL SDL_CreateAudioStream(const SDL_Au
10831079
*/
10841080
extern SDL_DECLSPEC SDL_PropertiesID SDLCALL SDL_GetAudioStreamProperties(SDL_AudioStream *stream);
10851081

1086-
#define SDL_PROP_AUDIOSTREAM_KEEP_ON_SHUTDOWN_BOOLEAN "SDL.audiostream.keep_on_shutdown"
1082+
#define SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN "SDL.audiostream.auto_cleanup"
10871083

10881084

10891085
/**

src/audio/SDL_audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ void SDL_QuitAudio(void)
10771077
SDL_AudioStream *next = NULL;
10781078
for (SDL_AudioStream *i = current_audio.existing_streams; i; i = next) {
10791079
next = i->next;
1080-
if (i->simplified || !SDL_GetBooleanProperty(i->props, SDL_PROP_AUDIOSTREAM_KEEP_ON_SHUTDOWN_BOOLEAN, false)) {
1080+
if (i->simplified || SDL_GetBooleanProperty(i->props, SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN, true)) {
10811081
SDL_DestroyAudioStream(i);
10821082
} else {
10831083
i->prev = NULL;

0 commit comments

Comments
 (0)