Updated test app to init the sound system
authorPaul Hunkin <paul@bieh.net>
Tue, 27 Jul 2010 11:35:06 +0200
changeset 4719 d59792d2c3ae
parent 4718 79aa6c61f33b
child 4720 80f8d672b52e
Updated test app to init the sound system
android/testproject/jni/lesson05.c
include/SDL_config_android.h
--- 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