fix some warnings from vita builds (missing includes) also some tidy-up to whitespace.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
diff --git a/src/audio/psp/SDL_pspaudio.c b/src/audio/psp/SDL_pspaudio.c
index 686ba71..56d730a 100644
--- a/src/audio/psp/SDL_pspaudio.c
+++ b/src/audio/psp/SDL_pspaudio.c
@@ -39,7 +39,7 @@
#include <pspthreadman.h>
/* The tag name used by PSP audio */
-#define PSPAUDIO_DRIVER_NAME "psp"
+#define PSPAUDIO_DRIVER_NAME "psp"
static int
PSPAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
@@ -117,6 +117,7 @@ static void PSPAUDIO_WaitDevice(_THIS)
{
/* Because we block when sending audio, there's no need for this function to do anything. */
}
+
static Uint8 *PSPAUDIO_GetDeviceBuf(_THIS)
{
return this->hidden->mixbufs[this->hidden->next_buffer];
@@ -127,7 +128,7 @@ static void PSPAUDIO_CloseDevice(_THIS)
if (this->hidden->channel >= 0) {
sceAudioChRelease(this->hidden->channel);
}
- free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */
+ free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */
SDL_free(this->hidden);
}
@@ -144,7 +145,6 @@ static void PSPAUDIO_ThreadInit(_THIS)
}
}
-
static int
PSPAUDIO_Init(SDL_AudioDriverImpl * impl)
{
@@ -158,14 +158,9 @@ PSPAUDIO_Init(SDL_AudioDriverImpl * impl)
/* PSP audio device */
impl->OnlyHasDefaultOutputDevice = 1;
-/*
+ /*
impl->HasCaptureSupport = 1;
-
impl->OnlyHasDefaultCaptureDevice = 1;
-*/
- /*
- impl->DetectDevices = DSOUND_DetectDevices;
- impl->Deinitialize = DSOUND_Deinitialize;
*/
return 1; /* this audio target is available. */
}
@@ -174,8 +169,6 @@ AudioBootStrap PSPAUDIO_bootstrap = {
"psp", "PSP audio driver", PSPAUDIO_Init, 0
};
- /* SDL_AUDI */
-
#endif /* SDL_AUDIO_DRIVER_PSP */
/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/audio/vita/SDL_vitaaudio.c b/src/audio/vita/SDL_vitaaudio.c
index 88b2b69..54238c5 100644
--- a/src/audio/vita/SDL_vitaaudio.c
+++ b/src/audio/vita/SDL_vitaaudio.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <malloc.h> /* memalign() */
#include "SDL_audio.h"
#include "SDL_error.h"
@@ -38,10 +39,10 @@
#include <psp2/audioout.h>
#define SCE_AUDIO_SAMPLE_ALIGN(s) (((s) + 63) & ~63)
-#define SCE_AUDIO_MAX_VOLUME 0x8000
+#define SCE_AUDIO_MAX_VOLUME 0x8000
/* The tag name used by VITA audio */
-#define VITAAUD_DRIVER_NAME "vita"
+#define VITAAUD_DRIVER_NAME "vita"
static int
VITAAUD_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
@@ -135,10 +136,11 @@ static void VITAAUD_CloseDevice(_THIS)
}
if (this->hidden->rawbuf != NULL) {
- free(this->hidden->rawbuf);
+ free(this->hidden->rawbuf); /* this uses memalign(), not SDL_malloc(). */
this->hidden->rawbuf = NULL;
}
}
+
static void VITAAUD_ThreadInit(_THIS)
{
/* Increase the priority of this audio thread by 1 to put it
@@ -152,11 +154,9 @@ static void VITAAUD_ThreadInit(_THIS)
}
}
-
static int
VITAAUD_Init(SDL_AudioDriverImpl * impl)
{
-
/* Set the function pointers */
impl->OpenDevice = VITAAUD_OpenDevice;
impl->PlayDevice = VITAAUD_PlayDevice;
@@ -167,11 +167,10 @@ VITAAUD_Init(SDL_AudioDriverImpl * impl)
/* VITA audio device */
impl->OnlyHasDefaultOutputDevice = 1;
-/*
+ /*
impl->HasCaptureSupport = 1;
-
impl->OnlyHasDefaultInputDevice = 1;
-*/
+ */
return 1; /* this audio target is available. */
}
@@ -179,8 +178,6 @@ AudioBootStrap VITAAUD_bootstrap = {
"vita", "VITA audio driver", VITAAUD_Init, 0
};
- /* SDL_AUDI */
-
#endif /* SDL_AUDIO_DRIVER_VITA */
/* vi: set ts=4 sw=4 expandtab: */