From 87ca456c3f3e97f149604bc033fdd57998e2dcd4 Mon Sep 17 00:00:00 2001 From: realtradam Date: Tue, 2 May 2023 20:45:40 -0400 Subject: added sample audio system --- src/rodeo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/rodeo.c') diff --git a/src/rodeo.c b/src/rodeo.c index 71c4666..c6ee71b 100644 --- a/src/rodeo.c +++ b/src/rodeo.c @@ -1,3 +1,4 @@ + // -- internal -- // public #include "rodeo.h" @@ -13,6 +14,7 @@ #endif #include "SDL2/SDL.h" #include "SDL2/SDL_image.h" +#include "SDL2/SDL_mixer.h" #include "SDL2/SDL_syswm.h" #include "bgfx/c99/bgfx.h" /*#define CGLM_FORCE_LEFT_HANDED*/ @@ -44,7 +46,7 @@ rodeo_window_init( "Initializing SDL..." ); - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER) < 0) + if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO) < 0) { rodeo_log( rodeo_logLevel_error, @@ -241,6 +243,8 @@ rodeo_window_init( state.default_texture.width = 1; state.default_texture.height = 1; + rodeo_audio_initialize(); + state.active_texture_p = &state.default_texture.internal_texture->texture_bgfx; } @@ -260,6 +264,7 @@ rodeo_window_deinit(void) bgfx_shutdown(); SDL_DestroyWindow(state.window); + Mix_Quit(); SDL_Quit(); } -- cgit v1.2.3