comparison src/audio/SDL_audio.c @ 4865:fff50e86c891

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 27ab20a36eba
comparison
equal deleted inserted replaced
4864:ebcb4988b16f 4865:fff50e86c891
27 #include "SDL_audio.h" 27 #include "SDL_audio.h"
28 #include "SDL_audio_c.h" 28 #include "SDL_audio_c.h"
29 #include "SDL_audiomem.h" 29 #include "SDL_audiomem.h"
30 #include "SDL_sysaudio.h" 30 #include "SDL_sysaudio.h"
31 31
32 #define _THIS SDL_AudioDevice *this 32 #define _THIS SDL_AudioDevice *_this
33 33
34 static SDL_AudioDriver current_audio; 34 static SDL_AudioDriver current_audio;
35 static SDL_AudioDevice *open_devices[16]; 35 static SDL_AudioDevice *open_devices[16];
36 36
37 /* !!! FIXME: These are wordy and unlocalized... */ 37 /* !!! FIXME: These are wordy and unlocalized... */
319 if (stream->buffer != NULL) { 319 if (stream->buffer != NULL) {
320 SDL_free(stream->buffer); 320 SDL_free(stream->buffer);
321 } 321 }
322 } 322 }
323 323
324 324 #if defined(ANDROID)
325 #include <android/log.h> 325 #include <android/log.h>
326 #endif
326 327
327 /* The general mixing thread function */ 328 /* The general mixing thread function */
328 int SDLCALL 329 int SDLCALL
329 SDL_RunAudio(void *devicep) 330 SDL_RunAudio(void *devicep)
330 { 331 {
889 return 0; 890 return 0;
890 } 891 }
891 device->opened = 1; 892 device->opened = 1;
892 893
893 /* Allocate a fake audio memory buffer */ 894 /* Allocate a fake audio memory buffer */
894 device->fake_stream = SDL_AllocAudioMem(device->spec.size); 895 device->fake_stream = (Uint8 *)SDL_AllocAudioMem(device->spec.size);
895 if (device->fake_stream == NULL) { 896 if (device->fake_stream == NULL) {
896 close_audio_device(device); 897 close_audio_device(device);
897 SDL_OutOfMemory(); 898 SDL_OutOfMemory();
898 return 0; 899 return 0;
899 } 900 }