diff src/audio/SDL_audio.c @ 4880:27c458e4ae31

Update VS2010 project to add new files; update new files so code builds on Win32/Win64
author Andreas Schiffler <aschiffler@ferzkopp.net>
date Mon, 23 Aug 2010 23:44:28 -0700
parents 1f7ad083fd3c
children
line wrap: on
line diff
--- a/src/audio/SDL_audio.c	Sun Aug 22 17:19:10 2010 -0700
+++ b/src/audio/SDL_audio.c	Mon Aug 23 23:44:28 2010 -0700
@@ -29,7 +29,7 @@
 #include "SDL_audiomem.h"
 #include "SDL_sysaudio.h"
 
-#define _THIS    SDL_AudioDevice *this
+#define _THIS SDL_AudioDevice *t
 
 static SDL_AudioDriver current_audio;
 static SDL_AudioDevice *open_devices[16];
@@ -321,8 +321,9 @@
     }
 }
 
-
+#if defined(ANDROID)
 #include <android/log.h>
+#endif
 
 /* The general mixing thread function */
 int SDLCALL
@@ -433,6 +434,7 @@
 
                 /* Read from the callback into the _input_ stream */
                 SDL_mutexP(device->mixer_lock);
+				istream_len = 0;
                 (*fill) (udata, istream, istream_len);
                 SDL_mutexV(device->mixer_lock);
 
@@ -891,7 +893,7 @@
     device->opened = 1;
 
     /* Allocate a fake audio memory buffer */
-    device->fake_stream = SDL_AllocAudioMem(device->spec.size);
+    device->fake_stream = (Uint8 *)SDL_AllocAudioMem(device->spec.size);
     if (device->fake_stream == NULL) {
         close_audio_device(device);
         SDL_OutOfMemory();