aboutsummaryrefslogtreecommitdiff
path: root/plugins/dfsound
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dfsound')
-rw-r--r--plugins/dfsound/spu.c13
-rw-r--r--plugins/dfsound/stdafx.h20
-rw-r--r--plugins/dfsound/xa.c4
3 files changed, 14 insertions, 23 deletions
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c
index 835555d..d39bbc1 100644
--- a/plugins/dfsound/spu.c
+++ b/plugins/dfsound/spu.c
@@ -18,6 +18,9 @@
* *
***************************************************************************/
+#ifndef _WIN32
+#include <sys/time.h> // gettimeofday in xa.c
+#endif
#include "stdafx.h"
#define _IN_SPU
@@ -28,16 +31,6 @@
#include "arm_features.h"
#include "spu_config.h"
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <locale.h>
-#define _(x) gettext(x)
-#define N_(x) (x)
-#else
-#define _(x) (x)
-#define N_(x) (x)
-#endif
-
#ifdef __ARM_ARCH_7A__
#define ssat32_to_16(v) \
asm("ssat %0,#16,%1" : "=r" (v) : "r" (v))
diff --git a/plugins/dfsound/stdafx.h b/plugins/dfsound/stdafx.h
index 8993bb3..7e22029 100644
--- a/plugins/dfsound/stdafx.h
+++ b/plugins/dfsound/stdafx.h
@@ -15,26 +15,20 @@
* *
***************************************************************************/
-#ifndef _MACOSX
-#include "config.h"
-#endif
#include <stdio.h>
#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <pthread.h>
-#define RRand(range) (random()%range)
#include <string.h>
-#include <sys/time.h>
-#include <math.h>
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#else
#undef CALLBACK
#define CALLBACK
#define DWORD unsigned int
-#define LOWORD(l) ((unsigned short)(l))
-#define HIWORD(l) ((unsigned short)(((unsigned int)(l) >> 16) & 0xFFFF))
+#define LOWORD(l) ((unsigned short)(l))
+#define HIWORD(l) ((unsigned short)(((unsigned int)(l) >> 16) & 0xFFFF))
+#endif
#ifndef INLINE
#define INLINE static inline
diff --git a/plugins/dfsound/xa.c b/plugins/dfsound/xa.c
index 704847b..9b7ed5a 100644
--- a/plugins/dfsound/xa.c
+++ b/plugins/dfsound/xa.c
@@ -90,9 +90,13 @@ INLINE void MixXA(int ns_to)
static unsigned long timeGetTime_spu()
{
+#ifdef _WIN32
+ return GetTickCount();
+#else
struct timeval tv;
gettimeofday(&tv, 0); // well, maybe there are better ways
return tv.tv_sec * 1000 + tv.tv_usec/1000; // to do that, but at least it works
+#endif
}
////////////////////////////////////////////////////////////////////////