Updated test app to init the sound system
authorPaul Hunkin <paul@bieh.net>
Tue, 27 Jul 2010 11:35:06 +0200
changeset 4719d59792d2c3ae
parent 4718 79aa6c61f33b
child 4720 80f8d672b52e
Updated test app to init the sound system
android/testproject/jni/lesson05.c
include/SDL_config_android.h
     1.1 --- a/android/testproject/jni/lesson05.c	Tue Jul 27 11:34:43 2010 +0200
     1.2 +++ b/android/testproject/jni/lesson05.c	Tue Jul 27 11:35:06 2010 +0200
     1.3 @@ -425,6 +425,15 @@
     1.4      /* resize the initial window */
     1.5      resizeWindow( SCREEN_WIDTH, SCREEN_HEIGHT );
     1.6  
     1.7 +    /* Load the SDL library */
     1.8 +    if (SDL_Init(SDL_INIT_AUDIO) < 0) {
     1.9 +        __android_log_print(ANDROID_LOG_INFO, "SDL","Couldn't initialize SDL Audio: %s\n", SDL_GetError());
    1.10 +        return (1);
    1.11 +    }else{
    1.12 +        __android_log_print(ANDROID_LOG_INFO, "SDL","Init audio ok\n");
    1.13 +    }
    1.14 +
    1.15 +
    1.16      /* wait for events */ 
    1.17      while ( !done )
    1.18  	{
     2.1 --- a/include/SDL_config_android.h	Tue Jul 27 11:34:43 2010 +0200
     2.2 +++ b/include/SDL_config_android.h	Tue Jul 27 11:35:06 2010 +0200
     2.3 @@ -47,7 +47,7 @@
     2.4  typedef unsigned int size_t;
     2.5  //typedef unsigned long uintptr_t;
     2.6  
     2.7 -#define SDL_AUDIO_DRIVER_DUMMY	1
     2.8 +#define SDL_AUDIO_DRIVER_ANDROID	1
     2.9  
    2.10  #define SDL_CDROM_DISABLED 1
    2.11