Mercurial > sdl-ios-xcode
changeset 4719:d59792d2c3ae
Updated test app to init the sound system
author | Paul Hunkin <paul@bieh.net> |
---|---|
date | Tue, 27 Jul 2010 11:35:06 +0200 |
parents | 79aa6c61f33b |
children | 80f8d672b52e |
files | android/testproject/jni/lesson05.c include/SDL_config_android.h |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/android/testproject/jni/lesson05.c Tue Jul 27 11:34:43 2010 +0200 +++ b/android/testproject/jni/lesson05.c Tue Jul 27 11:35:06 2010 +0200 @@ -425,6 +425,15 @@ /* resize the initial window */ resizeWindow( SCREEN_WIDTH, SCREEN_HEIGHT ); + /* Load the SDL library */ + if (SDL_Init(SDL_INIT_AUDIO) < 0) { + __android_log_print(ANDROID_LOG_INFO, "SDL","Couldn't initialize SDL Audio: %s\n", SDL_GetError()); + return (1); + }else{ + __android_log_print(ANDROID_LOG_INFO, "SDL","Init audio ok\n"); + } + + /* wait for events */ while ( !done ) {
--- a/include/SDL_config_android.h Tue Jul 27 11:34:43 2010 +0200 +++ b/include/SDL_config_android.h Tue Jul 27 11:35:06 2010 +0200 @@ -47,7 +47,7 @@ typedef unsigned int size_t; //typedef unsigned long uintptr_t; -#define SDL_AUDIO_DRIVER_DUMMY 1 +#define SDL_AUDIO_DRIVER_ANDROID 1 #define SDL_CDROM_DISABLED 1