Skip to content

Commit 024d211

Browse files
committed
testaudiodecoder: Opens an SDL audio device directly, must call SDL_Init().
Fixes #712.
1 parent 0ba0c18 commit 024d211

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/testaudiodecoder.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
3737
if (argc != 2) {
3838
SDL_Log("USAGE: %s <file_to_play>", argv[0]);
3939
return SDL_APP_FAILURE;
40+
} else if (!SDL_Init(SDL_INIT_AUDIO)) {
41+
SDL_Log("Couldn't initialize SDL: %s", SDL_GetError());
42+
return SDL_APP_FAILURE;
4043
} else if (!MIX_Init()) {
4144
SDL_Log("Couldn't initialize SDL_mixer: %s", SDL_GetError());
4245
return SDL_APP_FAILURE;

0 commit comments

Comments
 (0)